SQLite
Basic notes on setting up sqlite
Updated: 23 September 2025
Notes on using Sqlite, the getting started docs
Init a DB
A database file named mydb.db
can be instantiated with:
1sqlite3 mydb.db
This will also start the prompt
Using the Prompt
You can do things with the DB as normal using SQL, followed by ;
to run the query, for example we can create a table, insert some entries, etc.
1sqlite> CREATE TABLE Persons (id int, name text, city text);2sqlite> INSERT INTO Persons (id, name, city) VALUES (1, "Bob", "New York");3sqlite> SELECT * FROM Persons;41|Bob|New York
And whatever SQL stuff like you’d normally do