且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQLite3命令行操作

更新时间:2022-08-17 14:53:32

SQLite3命令行操作

# 启动
$ sqlite3

# 打开数据库
>.open people.db

# 格式化输出
>.header on
>.mode column
>.timer on

# 查看数据库文件
>.database

# 查看数据表 
>.tablse

# 查看表结构
>.schema person

# 查看数据
>select * from person;

# 退出
> .quit

参考

https://www.runoob.com/sqlite/sqlite-commands.html