For Android development, SQLite3 is the default database that comes with the Android OS. As such, it's a good idea to know some of the basic commands. We decided to keep them here for a handy reference. Leave us a Comment if we missed something you'd like us to include.
The ADB prompt looks like this.
The sqlite3 prompt looks like this.
To connect to a database:
# sqlite3 databasename.db
To list ALL tables in a database:
list ALL tables with names like 'foo' in a database:
sqlite> .tables foo
To show the create commands used to create the tables:
show the create commands used to create a table foo:
sqlite> .schema foo
To set column widths for output:
sqlite> .width col_width1 col_width2 col_width3 ...