Commands I use in sqlite

Because I don’t use sqlite often enough to remember:

  • .tables — list tables.
  • .schema table — schema for a table.
  • .schema — output the whole schema.
  • .mode column — to get nice output from SELECT.
  • .headers on — include column names in output from SELECT.
  • .q — quit.

And:

$ cat ~/.sqliterc 
.mode box --wrap 30

(I have the same issue remembering psql commands, too.)