SQLite 命令

sqlite3 交互 shell 的元命令(点命令)以 . 开头:.tables 看表、.schema 看结构、.quit 退出。

Beginner
Key PointsSQLite,点命令,sqlite3,.tables,.schema

讲解

sqlite3 交互 shell 的元命令(点命令)以 . 开头:.tables 看表、.schema 看结构、.quit 退出。

示例

SQL
sqlite3 test.db
.tables          -- 列出表
.schema company  -- 查看建表语句
.mode column     -- 输出按列对齐
.headers on      -- 显示列名
.quit            -- 退出
Output
sqlite> .tables
company
sqlite> .quit

Friends & Partners