Skip to main content

The command-line interface to SQLite 3, which is a self-contained file-based embedded SQL engine.

# To start an interactive shell with a new database:
sqlite3

# To open an interactive shell against an existing database:
sqlite3 path/to/database.sqlite3

# To execute an SQL statement against a database and then exit:
sqlite3 path/to/database.sqlite3 'SELECT * FROM some_table;'

# To create an empty database file (https://stackoverflow.com/a/51455470):
sqlite3 path/to/database.sqlite3 'VACUUM;'