For educational purposes only.
- Open an existing database (or create a new database) via SQLite:
sqlite3 [DB FILE]- e.g.
sqlite3 baseball.sqlite3* - alternatively, start a brand new database:
sqlite3 my_new_database.sqlite3
- e.g.
- View the database schema:
.schema - Configure sql output:
.read config.sql - Execute sql commands directly via the console
- use a semicolon (
;) to complete the command
- use a semicolon (
- Save and execute sql commands in
*.sqlfiles:.read [SQL FILE]- e.g.
.read demo.sql
- e.g.
- Exit SQLite application:
.quit
* baseball database is from https://github.com/chadwickbureau/baseballdatabank