SQLite

From Han Wiki
Jump to navigation Jump to search

List all databases and related files

sqlite> .databases


Show schemas of all tables

sqlite> .schema


Show schemas of a table

sqlite> .schema PRODUCTS


List all tables

sqlite> .tables


Transaction

Start, commit, or roll back a transaction

sqlite> BEGIN
... (perform some operations here) ...
sqlite> COMMIT
sqlite> ROLLBACK


Miscellaneous

Show execution time of a query

sqlite> .timer ON


Execute a shell command

sqlite> .system ls -l


Quit

sqlite> .quit