version 1.1.1.1, 2012/06/04 09:03:22 |
version 1.1.1.2, 2014/03/24 01:45:05 |
|
|
.\" First parameter, NAME, should be all caps |
.\" First parameter, NAME, should be all caps |
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection |
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection |
.\" other parameters are allowed: see man(7), man(1) |
.\" other parameters are allowed: see man(7), man(1) |
.TH SQLITE3 1 "Mon Apr 15 23:49:17 2002" |
.TH SQLITE3 1 "Mon Jan 31 11:14:00 2014" |
.\" Please adjust this date whenever revising the manpage. |
.\" Please adjust this date whenever revising the manpage. |
.\" |
.\" |
.\" Some roff macros, for reference: |
.\" Some roff macros, for reference: |
|
|
$ |
$ |
.B sqlite3 mydata.db |
.B sqlite3 mydata.db |
.br |
.br |
SQLite version 3.1.3 |
SQLite version 3.8.3 |
.br |
.br |
Enter ".help" for instructions |
Enter ".help" for instructions |
.br |
.br |
|
|
.B .help |
.B .help |
.nf |
.nf |
.cc | |
.cc | |
|
.backup ?DB? FILE Backup DB (default "main") to FILE |
|
.bail ON|OFF Stop after hitting an error. Default OFF |
.databases List names and files of attached databases |
.databases List names and files of attached databases |
.dump ?TABLE? ... Dump the database in an SQL text format |
.dump ?TABLE? ... Dump the database in an SQL text format |
|
If TABLE specified, only dump tables matching |
|
LIKE pattern TABLE. |
.echo ON|OFF Turn command echo on or off |
.echo ON|OFF Turn command echo on or off |
.exit Exit this program |
.exit Exit this program |
.explain ON|OFF Turn output mode suitable for EXPLAIN on or off. |
.explain ?ON|OFF? Turn output mode suitable for EXPLAIN on or off. |
|
With no args, it turns EXPLAIN on. |
.header(s) ON|OFF Turn display of headers on or off |
.header(s) ON|OFF Turn display of headers on or off |
.help Show this message |
.help Show this message |
.import FILE TABLE Import data from FILE into TABLE |
.import FILE TABLE Import data from FILE into TABLE |
.indices TABLE Show names of all indices on TABLE |
.indices ?TABLE? Show names of all indices |
|
If TABLE specified, only show indices for tables |
|
matching LIKE pattern TABLE. |
|
.load FILE ?ENTRY? Load an extension library |
|
.log FILE|off Turn logging on or off. FILE can be stderr/stdout |
.mode MODE ?TABLE? Set output mode where MODE is one of: |
.mode MODE ?TABLE? Set output mode where MODE is one of: |
csv Comma-separated values |
csv Comma-separated values |
column Left-aligned columns. (See .width) |
column Left-aligned columns. (See .width) |
|
|
list Values delimited by .separator string |
list Values delimited by .separator string |
tabs Tab-separated values |
tabs Tab-separated values |
tcl TCL list elements |
tcl TCL list elements |
.nullvalue STRING Print STRING in place of NULL values |
.nullvalue STRING Use STRING in place of NULL values |
|
.open ?FILENAME? Close existing database and reopen FILENAME |
.output FILENAME Send output to FILENAME |
.output FILENAME Send output to FILENAME |
.output stdout Send output to the screen |
.output stdout Send output to the screen |
|
.print STRING... Print literal STRING |
.prompt MAIN CONTINUE Replace the standard prompts |
.prompt MAIN CONTINUE Replace the standard prompts |
.quit Exit this program |
.quit Exit this program |
.read FILENAME Execute SQL in FILENAME |
.read FILENAME Execute SQL in FILENAME |
|
.restore ?DB? FILE Restore content of DB (default "main") from FILE |
.schema ?TABLE? Show the CREATE statements |
.schema ?TABLE? Show the CREATE statements |
|
If TABLE specified, only show tables matching |
|
LIKE pattern TABLE. |
.separator STRING Change separator used by output mode and .import |
.separator STRING Change separator used by output mode and .import |
.show Show the current values for various settings |
.show Show the current values for various settings |
.tables ?PATTERN? List names of tables matching a LIKE pattern |
.stats ON|OFF Turn stats on or off |
|
.tables ?TABLE? List names of tables |
|
If TABLE specified, only list tables matching |
|
LIKE pattern TABLE. |
.timeout MS Try opening locked tables for MS milliseconds |
.timeout MS Try opening locked tables for MS milliseconds |
.width NUM NUM ... Set column widths for "column" mode |
.trace FILE|off Output each SQL statement as it is run |
|
.vfsname ?AUX? Print the name of the VFS stack |
|
.width NUM1 NUM2 ... Set column widths for "column" mode |
|
.timer ON|OFF Turn the CPU timer measurement on or off |
sqlite> |
sqlite> |
|cc . |
|cc . |
.sp |
.sp |
.fi |
.fi |
|
|
.SH OPTIONS |
.SH OPTIONS |
.B sqlite3 |
.B sqlite3 |
has the following options: |
has the following options: |
.TP |
.TP |
.BI \-init\ file |
.B \-bail |
Read and execute commands from |
Stop after hitting an error. |
.I file |
|
, which can contain a mix of SQL statements and meta-commands. |
|
.TP |
.TP |
|
.B \-batch |
|
Force batch I/O. |
|
.TP |
|
.B \-column |
|
Query results will be displayed in a table like form, using |
|
whitespace characters to separate the columns and align the |
|
output. |
|
.TP |
|
.BI \-cmd\ command |
|
run |
|
.I command |
|
before reading stdin |
|
.TP |
|
.B \-csv |
|
Set output mode to CSV (comma separated values). |
|
.TP |
.B \-echo |
.B \-echo |
Print commands before execution. |
Print commands before execution. |
.TP |
.TP |
|
.BI \-init\ file |
|
Read and execute commands from |
|
.I file |
|
, which can contain a mix of SQL statements and meta-commands. |
|
.TP |
.B \-[no]header |
.B \-[no]header |
Turn headers on or off. |
Turn headers on or off. |
.TP |
.TP |
.B \-column |
.B \-help |
Query results will be displayed in a table like form, using |
Show help on options and exit. |
whitespace characters to separate the columns and align the |
|
output. |
|
.TP |
.TP |
.B \-html |
.B \-html |
Query results will be output as simple HTML tables. |
Query results will be output as simple HTML tables. |
.TP |
.TP |
|
.B \-interactive |
|
Force interactive I/O. |
|
.TP |
.B \-line |
.B \-line |
Query results will be displayed with one value per line, rows |
Query results will be displayed with one value per line, rows |
separated by a blank line. Designed to be easily parsed by |
separated by a blank line. Designed to be easily parsed by |
|
|
Query results will be displayed with the separator (|, by default) |
Query results will be displayed with the separator (|, by default) |
character between each field value. The default. |
character between each field value. The default. |
.TP |
.TP |
.BI \-separator\ separator |
.BI \-mmap\ N |
Set output field separator. Default is '|'. |
Set default mmap size to |
|
.I N |
|
\. |
.TP |
.TP |
.BI \-nullvalue\ string |
.BI \-nullvalue\ string |
Set string used to represent NULL values. Default is '' |
Set string used to represent NULL values. Default is '' |
(empty string). |
(empty string). |
.TP |
.TP |
|
.BI \-separator\ separator |
|
Set output field separator. Default is '|'. |
|
.TP |
|
.B \-stats |
|
Print memory stats before each finalize. |
|
.TP |
.B \-version |
.B \-version |
Show SQLite version. |
Show SQLite version. |
.TP |
.TP |
.B \-help |
.BI \-vfs\ name |
Show help on options and exit. |
Use |
|
.I name |
|
as the default VFS. |
|
|
|
|
.SH INIT FILE |
.SH INIT FILE |
|
|
.SH SEE ALSO |
.SH SEE ALSO |
http://www.sqlite.org/ |
http://www.sqlite.org/ |
.br |
.br |
The sqlite-doc package |
The sqlite3-doc package. |
.SH AUTHOR |
.SH AUTHOR |
This manual page was originally written by Andreas Rottmann |
This manual page was originally written by Andreas Rottmann |
<rotty@debian.org>, for the Debian GNU/Linux system (but may be used |
<rotty@debian.org>, for the Debian GNU/Linux system (but may be used |
by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com>. |
by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com> and |
|
further updated by Laszlo Boszormenyi <gcs@debian.hu> . |