SQLite

Revision as of 11:29, 5 October 2024 by Mhan (talk | contribs) (add other examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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