| OLD | NEW |
| 1 .\" Hey, EMACS: -*- nroff -*- | 1 .\" Hey, EMACS: -*- nroff -*- |
| 2 .\" First parameter, NAME, should be all caps | 2 .\" First parameter, NAME, should be all caps |
| 3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection | 3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection |
| 4 .\" other parameters are allowed: see man(7), man(1) | 4 .\" other parameters are allowed: see man(7), man(1) |
| 5 .TH SQLITE3 1 "Mon Jan 31 11:14:00 2014" | 5 .TH SQLITE3 1 "Fri Oct 31 10:41:31 EDT 2014" |
| 6 .\" Please adjust this date whenever revising the manpage. | 6 .\" Please adjust this date whenever revising the manpage. |
| 7 .\" | 7 .\" |
| 8 .\" Some roff macros, for reference: | 8 .\" Some roff macros, for reference: |
| 9 .\" .nh disable hyphenation | 9 .\" .nh disable hyphenation |
| 10 .\" .hy enable hyphenation | 10 .\" .hy enable hyphenation |
| 11 .\" .ad l left justify | 11 .\" .ad l left justify |
| 12 .\" .ad b justify to both left and right margins | 12 .\" .ad b justify to both left and right margins |
| 13 .\" .nf disable filling | 13 .\" .nf disable filling |
| 14 .\" .fi enable filling | 14 .\" .fi enable filling |
| 15 .\" .br insert line break | 15 .\" .br insert line break |
| (...skipping 26 matching lines...) Expand all Loading... |
| 42 command and optionally provide the name of a database file. If the | 42 command and optionally provide the name of a database file. If the |
| 43 database file does not exist, it will be created. If the database file | 43 database file does not exist, it will be created. If the database file |
| 44 does exist, it will be opened. | 44 does exist, it will be opened. |
| 45 | 45 |
| 46 For example, to create a new database file named "mydata.db", create | 46 For example, to create a new database file named "mydata.db", create |
| 47 a table named "memos" and insert a couple of records into that table: | 47 a table named "memos" and insert a couple of records into that table: |
| 48 .sp | 48 .sp |
| 49 $ | 49 $ |
| 50 .B sqlite3 mydata.db | 50 .B sqlite3 mydata.db |
| 51 .br | 51 .br |
| 52 SQLite version 3.8.3 | 52 SQLite version 3.8.8 |
| 53 .br | 53 .br |
| 54 Enter ".help" for instructions | 54 Enter ".help" for instructions |
| 55 .br | 55 .br |
| 56 sqlite> | 56 sqlite> |
| 57 .B create table memos(text, priority INTEGER); | 57 .B create table memos(text, priority INTEGER); |
| 58 .br | 58 .br |
| 59 sqlite> | 59 sqlite> |
| 60 .B insert into memos values('deliver project description', 10); | 60 .B insert into memos values('deliver project description', 10); |
| 61 .br | 61 .br |
| 62 sqlite> | 62 sqlite> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 database files, or perform administrative operations upon the | 100 database files, or perform administrative operations upon the |
| 101 attached databases (such as rebuilding indices). Meta-commands are | 101 attached databases (such as rebuilding indices). Meta-commands are |
| 102 always prefixed with a dot (.). | 102 always prefixed with a dot (.). |
| 103 | 103 |
| 104 A list of available meta-commands can be viewed at any time by issuing | 104 A list of available meta-commands can be viewed at any time by issuing |
| 105 the '.help' command. For example: | 105 the '.help' command. For example: |
| 106 .sp | 106 .sp |
| 107 sqlite> | 107 sqlite> |
| 108 .B .help | 108 .B .help |
| 109 .nf | 109 .nf |
| 110 .cc | | 110 .tr %. |
| 111 .backup ?DB? FILE Backup DB (default "main") to FILE | 111 %backup ?DB? FILE Backup DB (default "main") to FILE |
| 112 .bail ON|OFF Stop after hitting an error. Default OFF | 112 %bail on|off Stop after hitting an error. Default OFF |
| 113 .databases List names and files of attached databases | 113 %clone NEWDB Clone data into NEWDB from the existing database |
| 114 .dump ?TABLE? ... Dump the database in an SQL text format | 114 %databases List names and files of attached databases |
| 115 %dump ?TABLE? ... Dump the database in an SQL text format |
| 115 If TABLE specified, only dump tables matching | 116 If TABLE specified, only dump tables matching |
| 116 LIKE pattern TABLE. | 117 LIKE pattern TABLE. |
| 117 .echo ON|OFF Turn command echo on or off | 118 %echo on|off Turn command echo on or off |
| 118 .exit Exit this program | 119 %eqp on|off Enable or disable automatic EXPLAIN QUERY PLAN |
| 119 .explain ?ON|OFF? Turn output mode suitable for EXPLAIN on or off. | 120 %exit Exit this program |
| 121 %explain ?on|off? Turn output mode suitable for EXPLAIN on or off. |
| 120 With no args, it turns EXPLAIN on. | 122 With no args, it turns EXPLAIN on. |
| 121 .header(s) ON|OFF Turn display of headers on or off | 123 %fullschema Show schema and the content of sqlite_stat tables |
| 122 .help Show this message | 124 %headers on|off Turn display of headers on or off |
| 123 .import FILE TABLE Import data from FILE into TABLE | 125 %help Show this message |
| 124 .indices ?TABLE? Show names of all indices | 126 %import FILE TABLE Import data from FILE into TABLE |
| 127 %indices ?TABLE? Show names of all indices |
| 125 If TABLE specified, only show indices for tables | 128 If TABLE specified, only show indices for tables |
| 126 matching LIKE pattern TABLE. | 129 matching LIKE pattern TABLE. |
| 127 .load FILE ?ENTRY? Load an extension library | 130 %load FILE ?ENTRY? Load an extension library |
| 128 .log FILE|off Turn logging on or off. FILE can be stderr/stdout | 131 %log FILE|off Turn logging on or off. FILE can be stderr/stdout |
| 129 .mode MODE ?TABLE? Set output mode where MODE is one of: | 132 %mode MODE ?TABLE? Set output mode where MODE is one of: |
| 130 csv Comma-separated values | 133 csv Comma-separated values |
| 131 column Left-aligned columns. (See .width) | 134 column Left-aligned columns. (See .width) |
| 132 html HTML <table> code | 135 html HTML <table> code |
| 133 insert SQL insert statements for TABLE | 136 insert SQL insert statements for TABLE |
| 134 line One value per line | 137 line One value per line |
| 135 list Values delimited by .separator string | 138 list Values delimited by .separator string |
| 136 tabs Tab-separated values | 139 tabs Tab-separated values |
| 137 tcl TCL list elements | 140 tcl TCL list elements |
| 138 .nullvalue STRING Use STRING in place of NULL values | 141 %nullvalue STRING Use STRING in place of NULL values |
| 139 .open ?FILENAME? Close existing database and reopen FILENAME | 142 %once FILENAME Output for the next SQL command only to FILENAME |
| 140 .output FILENAME Send output to FILENAME | 143 %open ?FILENAME? Close existing database and reopen FILENAME |
| 141 .output stdout Send output to the screen | 144 %output ?FILENAME? Send output to FILENAME or stdout |
| 142 .print STRING... Print literal STRING | 145 %print STRING... Print literal STRING |
| 143 .prompt MAIN CONTINUE Replace the standard prompts | 146 %prompt MAIN CONTINUE Replace the standard prompts |
| 144 .quit Exit this program | 147 %quit Exit this program |
| 145 .read FILENAME Execute SQL in FILENAME | 148 %read FILENAME Execute SQL in FILENAME |
| 146 .restore ?DB? FILE Restore content of DB (default "main") from FILE | 149 %restore ?DB? FILE Restore content of DB (default "main") from FILE |
| 147 .schema ?TABLE? Show the CREATE statements | 150 %save FILE Write in-memory database into FILE |
| 151 %schema ?TABLE? Show the CREATE statements |
| 148 If TABLE specified, only show tables matching | 152 If TABLE specified, only show tables matching |
| 149 LIKE pattern TABLE. | 153 LIKE pattern TABLE. |
| 150 .separator STRING Change separator used by output mode and .import | 154 %separator STRING ?NL? Change separator used by output mode and .import |
| 151 .show Show the current values for various settings | 155 NL is the end-of-line mark for CSV |
| 152 .stats ON|OFF Turn stats on or off | 156 %shell CMD ARGS... Run CMD ARGS... in a system shell |
| 153 .tables ?TABLE? List names of tables | 157 %show Show the current values for various settings |
| 158 %stats on|off Turn stats on or off |
| 159 %system CMD ARGS... Run CMD ARGS... in a system shell |
| 160 %tables ?TABLE? List names of tables |
| 154 If TABLE specified, only list tables matching | 161 If TABLE specified, only list tables matching |
| 155 LIKE pattern TABLE. | 162 LIKE pattern TABLE. |
| 156 .timeout MS Try opening locked tables for MS milliseconds | 163 %timeout MS Try opening locked tables for MS milliseconds |
| 157 .trace FILE|off Output each SQL statement as it is run | 164 %timer on|off Turn SQL timer on or off |
| 158 .vfsname ?AUX? Print the name of the VFS stack | 165 %trace FILE|off Output each SQL statement as it is run |
| 159 .width NUM1 NUM2 ... Set column widths for "column" mode | 166 %vfsname ?AUX? Print the name of the VFS stack |
| 160 .timer ON|OFF Turn the CPU timer measurement on or off | 167 %width NUM1 NUM2 ... Set column widths for "column" mode |
| 168 Negative values right-justify |
| 161 sqlite> | 169 sqlite> |
| 162 |cc . | |
| 163 .sp | 170 .sp |
| 164 .fi | 171 .fi |
| 165 .SH OPTIONS | 172 .SH OPTIONS |
| 166 .B sqlite3 | 173 .B sqlite3 |
| 167 has the following options: | 174 has the following options: |
| 168 .TP | 175 .TP |
| 169 .B \-bail | 176 .B \-bail |
| 170 Stop after hitting an error. | 177 Stop after hitting an error. |
| 171 .TP | 178 .TP |
| 172 .B \-batch | 179 .B \-batch |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 .B ~/.sqliterc | 269 .B ~/.sqliterc |
| 263 exists, it is processed first. | 270 exists, it is processed first. |
| 264 can be found in the user's home directory, it is | 271 can be found in the user's home directory, it is |
| 265 read and processed. It should generally only contain meta-commands. | 272 read and processed. It should generally only contain meta-commands. |
| 266 | 273 |
| 267 o If the -init option is present, the specified file is processed. | 274 o If the -init option is present, the specified file is processed. |
| 268 | 275 |
| 269 o All other command line options are processed. | 276 o All other command line options are processed. |
| 270 | 277 |
| 271 .SH SEE ALSO | 278 .SH SEE ALSO |
| 272 http://www.sqlite.org/ | 279 http://www.sqlite.org/cli.html |
| 273 .br | 280 .br |
| 274 The sqlite3-doc package. | 281 The sqlite3-doc package. |
| 275 .SH AUTHOR | 282 .SH AUTHOR |
| 276 This manual page was originally written by Andreas Rottmann | 283 This manual page was originally written by Andreas Rottmann |
| 277 <rotty@debian.org>, for the Debian GNU/Linux system (but may be used | 284 <rotty@debian.org>, for the Debian GNU/Linux system (but may be used |
| 278 by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com> and | 285 by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com> and |
| 279 further updated by Laszlo Boszormenyi <gcs@debian.hu> . | 286 further updated by Laszlo Boszormenyi <gcs@debian.hu> . |
| OLD | NEW |