PasteZap
🌐 简体中文
免费 · 无需注册

免费 · 开发

SQLite 查看与编辑工具.

在浏览器中打开 SQLite 数据库(.db、.sqlite):浏览表和结构、运行 SQL 查询、编辑数据,并将结果导出为 CSV 或 JSON。

开始之前

部分技术控件使用英语。支持 Unicode 文本;文件格式和输出语言取决于具体工具。

下面以英语列出技术限制。处理大型文件或使用结果之前,请先查看这些限制。

Drop a SQLite database here or

.db, .sqlite, .sqlite3 · up to 300 MB · opened on your device, nothing is uploaded

打开并查询 SQLite 数据库

  1. 把 .db、.sqlite 或 .sqlite3 文件拖到页面上,或点击 Or start an empty database。
  2. 左栏列出每个表和视图及其行数和列;点击即可显示前 100 行。
  3. 在编辑器中输入 SQL,然后点击 Run query (Ctrl+Enter)。用分号分隔的多条语句会依次执行。
  4. 可将任意结果导出为 CSV 或 JSON,点击 Download database 把修改保存为新文件。

原文件绝不会被修改:UPDATE、INSERT 或 CREATE TABLE 等更改会保留在页面中,直到您下载数据库。

限制和使用建议

可打开最大 300 MB 的数据库;每个结果最多显示 10,000 行。打开文件时会进行完整性检查。无法读取加密数据库(SQLCipher)。出错时,提示会指出失败的语句。

如需把 CSV 或 JSON 文件变成表,请使用对 CSV 和 JSON 文件执行 SQL 查询;如需整理很长的查询,请使用 SQL 格式化工具。

限制与支持格式

输入内容在您的设备上处理。

英语技术说明

Databases up to 300 MB; results show up to 10,000 rows per query. Encrypted (SQLCipher) databases cannot be opened. Changes are kept only until you download the database; the original file is never modified.

Runs SQLite 3 compiled to WebAssembly (sql.js, MIT; SQLite is public domain) in a background worker, with an integrity check when the file opens. Multiple statements run in order; errors name the failing statement.

Start an empty database: the sample statements create a notes table, insert a row and show it; Download database saves the result as a .sqlite file.

常见问题

我的数据库会被上传吗?

不会。SQLite 以 WebAssembly 形式在浏览器的后台 worker 中运行,文件始终留在您的设备上。

使用哪种 SQL 方言?

SQLite 3,支持 date()、json_extract() 和窗口函数等常用函数。

可以编辑手机应用的数据库吗?

如果是普通 SQLite 文件就可以。下载修改后的数据库,再用应用自带的工具放回;很多应用会校验自己的文件,请务必备份。