Skip to content

Instantly share code, notes, and snippets.

@appkr
Created June 17, 2016 06:45
Show Gist options
  • Select an option

  • Save appkr/3c05363eeaec5ef16111d6641af2c7f7 to your computer and use it in GitHub Desktop.

Select an option

Save appkr/3c05363eeaec5ef16111d6641af2c7f7 to your computer and use it in GitHub Desktop.
SQLite
$ sqlite3 path-to-database-file
sqlite> .tables # list tables
sqlite> .headers ON
sqlite> .mode columns
sqlite> PRAGMA table_info(table_name); # table schema
sqlite> SELECT type, name, tbl_name FROM sqlite_master WHERE type='index';
# list index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment