Command Line Shell for SQLite


The SQLite library includes a simple command-line utility named sqlite3 that allows the user to manually enter and execute SQL commands against an SQLite database. Most of the time, sqlite3 just reads lines of input and passes them on to the SQLite library for execution. But if an input line begins with a dot (‘.’), then that line is intercepted and interpreted by the sqlite3 program itself. These “dot commands” are typically used to change the output format of queries, or to execute certain prepackaged query statements.
.help
List the available dot commands.

.databases
List names and files of attached databases. For example,
  sqlite> .databases 
  seq  name   file
  ---  -----  ---------------------------------------------
  0    main   /data/data/com.wenchen.SQLiteDemo/databases/applicationdat
  1    temp
.tables   [ pattern ]
List names of tables matching a like pattern. For example,
  sqlite> .tables  %android% 
  android_metadata
.schema   [ table ]
Show the CREATE statements. If table specified, only show tables matching a like pattern table. For example,
  sqlite> .schema    
  CREATE TABLE android_metadata (locale TEXT);
  CREATE TABLE comments (
    _id integer primary key autoincrement,
    comment text not null );



      “Music is ... A higher revelation than all Wisdom & Philosophy”    
      ― Ludwig van Beethoven