SQLite
A Complete SQLite experince
- Already installed on macs.
- (I don’t know windows)
- Run
sqlite3to run the sqlite program. .helpto see all commands.save test.db|sqliteto save the current in-memory db.connect test.db|sqliteto save the current in-memory db- start and create db at same time
sqlite3 tutorial.db .schema users- only single quoates for strings
- can pass in
nulltoPRIMARY KEYfor auto increment, when usingVALUES - Hit ctrl-C twice to terminate the program.
.showto show settings and database
-- yup, formatting worksCREATE TABLE users ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, email TEXT UNIQUE,)