## # Creating an SQLite DB # $ sqlite browser.sqlite SQLite version 2.8.17 Enter ".help" for instructions sqlite> ## # SQLite Dot Commands # sqlite> .help .databases List names and files of attached databases .dump ?TABLE? ... Dump the database in a text format .echo ON|OFF Turn command echo on or off .exit Exit this program .explain ON|OFF Turn output mode suitable for EXPLAIN on or off. .header(s) ON|OFF Turn display of headers on or off .help Show this message .indices TABLE Show names of all indices on TABLE .mode MODE Set mode to one of "line(s)", "column(s)", "insert", "list", or "html" .mode insert TABLE Generate SQL insert statements for TABLE .nullvalue STRING Print STRING instead of nothing for NULL data .output FILENAME Send output to FILENAME .output stdout Send output to the screen .prompt MAIN CONTINUE Replace the standard prompts .quit Exit this program .read FILENAME Execute SQL in FILENAME .schema ?TABLE? Show the CREATE statements .separator STRING Change separator string for "list" mode .show Show the current values for various settings .tables ?PATTERN? List names of tables matching a pattern .timeout MS Try opening locked tables for MS milliseconds .width NUM NUM ... Set column widths for "column" mode sqlite> CREATE TABLE log(method TEXT, uri TEXT, protocol TEXT, ip TEXT, user_agent TEXT, count INT, data TEXT); sqlite> DELETE FROM log WHERE rowid = 5; sqlite> CREATE TABLE log(referer TEXT, count INT, date TEXT); $ sqlite -help Usage: sqlite [OPTIONS] FILENAME [SQL] Options are: -init filename read/process named file -echo print commands before execution -[no]header turn headers on or off -column set output mode to 'column' -html set output mode to HTML -line set output mode to 'line' -list set output mode to 'list' -separator 'x' set output field separator (|) -nullvalue 'text' set text string for NULL values -version show SQLite version -help show this text, also show dot-commands