基础操作
$ sqlite3 new.db # 相当于创建数据库 SQLite version 3.34.0 2020-12-01 16:14:00 Enter ".help" for usage hints. sqlite> sqlite> CREATE TABLE COMPANY( # 创建表 COMPANY ID INT PRIMARY KEY NOT NULL, NAME TEXT NOT NULL, AGE INT NOT NULL, ADDRESS CHAR(50), SALARY REAL ); sqlite> CREATE TABLE DEPARTMENT( # 创建表 DEPARTMENT ID INT PRIMARY KEY NOT NULL, DEPT CHAR(50) NOT NULL, EMP_ID INT NOT NULL ); sqlite>.tables # 查看所有表 COMPANY DEPARTMENT sqlite>.schema COMPANY # 查看表结构
专用于 SQLite 的工具
sqlitebrowser – GUI editor for SQLite databases
http://sqlitebrowser.org/
sqliteman – GUI tool for SQLite3 admin and developers alike
http://sqliteman.com/
wxsqlite3-3.0-dbg – Debugging symbols for wxSQLite3 3.0
http://utelle.github.io/wxsqlite3/docs/html/index.html
SQLiteStudio
https://sqlitestudio.pl/index.rvt
SQLite Administrator
http://sqliteadmin.orbmu2k.de/