If TABLE specified, only list tables matching show Show the current values for various settings separator STRING Change separator used by output mode and. If TABLE specified, only show tables matching schema ?TABLE? Show the CREATE statements restore ?DB? FILE Restore content of DB (default "main") from FILE prompt MAIN CONTINUE Replace the standard prompts nullvalue STRING Print STRING in place of NULL values mode MODE ?TABLE? Set output mode where MODE is one of:Ĭolumn Left-aligned columns. load FILE ?ENTRY? Load an extension library If TABLE specified, only show indices for tables indices ?TABLE? Show names of all indices import FILE TABLE Import data from FILE into TABLE People used to working with other databases are used to having a 'drop database' command, but in SQLite there is no similar command. header(s) ON|OFF Turn display of headers on or off To create a new database, just do sqliteopen() or from the command line sqlite3 databasefilename. explain ?ON|OFF? Turn output mode suitable for EXPLAIN on or off. If TABLE specified, only dump tables matching databases List names and files of attached databases bail ON|OFF Stop after hitting an error. backup ?DB? FILE Backup DB (default "main") to FILE For your convenience, here is that sqlite help output: On a related note, when you're using the SQLite command line tool (sqlite3), you can type ".help" to get a list of sqlite commands you can issue. i'm now back at my regular command line: show the schema of the 'projects' table:ĬREATE TABLE projects ( id integer primary key autoincrement, name text not null, type text not null, description text ) # sqlite3 data/data//databases/fptracker.db in this case my database is named fptracker: use the sqlite3 command to connect to your database. Here's an example of how this works, with comments shown before each command: You can show a list of SQLite tables by starting the Android adb shell (command line tool), and then properly invoking the sqlite3 command. Android/SQLite FAQ: How do I show a list of SQLite database tables from the Android command line (adb shell)?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |