SQLite 🦐


SQLite is a file-based database. The database is stored in a file such as users.db and queried using SQL.

To run SQL, either use sqlite3 users.db to open a prompt, or directly run a query using sqlite3 xxx.db some_query.

  • SQLite version v1 πŸ”Ž: file users.db
  • SQLite version v2 πŸ”Ž: select sqlite_version()
  • Help πŸƒ: .help

Common commands:

  • Dump database πŸ—ƒοΈ: .dump
  • List tables 🧊: .tables
  • List columns πŸ«•: PRAGMA table_info(some_table);
  • Schema ✍️: select sql from sqlite_master