Deleted Added
full compact
sqlite3.1 (251886) sqlite3.1 (269851)
1.\" Hey, EMACS: -*- nroff -*-
2.\" First parameter, NAME, should be all caps
3.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4.\" other parameters are allowed: see man(7), man(1)
1.\" Hey, EMACS: -*- nroff -*-
2.\" First parameter, NAME, should be all caps
3.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4.\" other parameters are allowed: see man(7), man(1)
5.TH SQLITE3 1 "Mon Apr 15 23:49:17 2002"
5.TH SQLITE3 1 "Mon Jan 31 11:14:00 2014"
6.\" Please adjust this date whenever revising the manpage.
7.\"
8.\" Some roff macros, for reference:
9.\" .nh disable hyphenation
10.\" .hy enable hyphenation
11.\" .ad l left justify
12.\" .ad b justify to both left and right margins
13.\" .nf disable filling

--- 30 unchanged lines hidden (view full) ---

44does exist, it will be opened.
45
46For example, to create a new database file named "mydata.db", create
47a table named "memos" and insert a couple of records into that table:
48.sp
49$
50.B sqlite3 mydata.db
51.br
6.\" Please adjust this date whenever revising the manpage.
7.\"
8.\" Some roff macros, for reference:
9.\" .nh disable hyphenation
10.\" .hy enable hyphenation
11.\" .ad l left justify
12.\" .ad b justify to both left and right margins
13.\" .nf disable filling

--- 30 unchanged lines hidden (view full) ---

44does exist, it will be opened.
45
46For example, to create a new database file named "mydata.db", create
47a table named "memos" and insert a couple of records into that table:
48.sp
49$
50.B sqlite3 mydata.db
51.br
52SQLite version 3.1.3
52SQLite version 3.8.3
53.br
54Enter ".help" for instructions
55.br
56sqlite>
57.B create table memos(text, priority INTEGER);
58.br
59sqlite>
60.B insert into memos values('deliver project description', 10);

--- 42 unchanged lines hidden (view full) ---

103
104A list of available meta-commands can be viewed at any time by issuing
105the '.help' command. For example:
106.sp
107sqlite>
108.B .help
109.nf
110.cc |
53.br
54Enter ".help" for instructions
55.br
56sqlite>
57.B create table memos(text, priority INTEGER);
58.br
59sqlite>
60.B insert into memos values('deliver project description', 10);

--- 42 unchanged lines hidden (view full) ---

103
104A list of available meta-commands can be viewed at any time by issuing
105the '.help' command. For example:
106.sp
107sqlite>
108.B .help
109.nf
110.cc |
111.backup ?DB? FILE Backup DB (default "main") to FILE
112.bail ON|OFF Stop after hitting an error. Default OFF
111.databases List names and files of attached databases
112.dump ?TABLE? ... Dump the database in an SQL text format
113.databases List names and files of attached databases
114.dump ?TABLE? ... Dump the database in an SQL text format
115 If TABLE specified, only dump tables matching
116 LIKE pattern TABLE.
113.echo ON|OFF Turn command echo on or off
114.exit Exit this program
117.echo ON|OFF Turn command echo on or off
118.exit Exit this program
115.explain ON|OFF Turn output mode suitable for EXPLAIN on or off.
119.explain ?ON|OFF? Turn output mode suitable for EXPLAIN on or off.
120 With no args, it turns EXPLAIN on.
116.header(s) ON|OFF Turn display of headers on or off
117.help Show this message
118.import FILE TABLE Import data from FILE into TABLE
121.header(s) ON|OFF Turn display of headers on or off
122.help Show this message
123.import FILE TABLE Import data from FILE into TABLE
119.indices TABLE Show names of all indices on TABLE
124.indices ?TABLE? Show names of all indices
125 If TABLE specified, only show indices for tables
126 matching LIKE pattern TABLE.
127.load FILE ?ENTRY? Load an extension library
128.log FILE|off Turn logging on or off. FILE can be stderr/stdout
120.mode MODE ?TABLE? Set output mode where MODE is one of:
121 csv Comma-separated values
122 column Left-aligned columns. (See .width)
123 html HTML <table> code
124 insert SQL insert statements for TABLE
125 line One value per line
126 list Values delimited by .separator string
127 tabs Tab-separated values
128 tcl TCL list elements
129.mode MODE ?TABLE? Set output mode where MODE is one of:
130 csv Comma-separated values
131 column Left-aligned columns. (See .width)
132 html HTML <table> code
133 insert SQL insert statements for TABLE
134 line One value per line
135 list Values delimited by .separator string
136 tabs Tab-separated values
137 tcl TCL list elements
129.nullvalue STRING Print STRING in place of NULL values
138.nullvalue STRING Use STRING in place of NULL values
139.open ?FILENAME? Close existing database and reopen FILENAME
130.output FILENAME Send output to FILENAME
131.output stdout Send output to the screen
140.output FILENAME Send output to FILENAME
141.output stdout Send output to the screen
142.print STRING... Print literal STRING
132.prompt MAIN CONTINUE Replace the standard prompts
133.quit Exit this program
134.read FILENAME Execute SQL in FILENAME
143.prompt MAIN CONTINUE Replace the standard prompts
144.quit Exit this program
145.read FILENAME Execute SQL in FILENAME
146.restore ?DB? FILE Restore content of DB (default "main") from FILE
135.schema ?TABLE? Show the CREATE statements
147.schema ?TABLE? Show the CREATE statements
148 If TABLE specified, only show tables matching
149 LIKE pattern TABLE.
136.separator STRING Change separator used by output mode and .import
137.show Show the current values for various settings
150.separator STRING Change separator used by output mode and .import
151.show Show the current values for various settings
138.tables ?PATTERN? List names of tables matching a LIKE pattern
152.stats ON|OFF Turn stats on or off
153.tables ?TABLE? List names of tables
154 If TABLE specified, only list tables matching
155 LIKE pattern TABLE.
139.timeout MS Try opening locked tables for MS milliseconds
156.timeout MS Try opening locked tables for MS milliseconds
140.width NUM NUM ... Set column widths for "column" mode
157.trace FILE|off Output each SQL statement as it is run
158.vfsname ?AUX? Print the name of the VFS stack
159.width NUM1 NUM2 ... Set column widths for "column" mode
160.timer ON|OFF Turn the CPU timer measurement on or off
141sqlite>
142|cc .
143.sp
144.fi
161sqlite>
162|cc .
163.sp
164.fi
145
146.SH OPTIONS
147.B sqlite3
148has the following options:
149.TP
165.SH OPTIONS
166.B sqlite3
167has the following options:
168.TP
150.BI \-init\ file
151Read and execute commands from
152.I file
153, which can contain a mix of SQL statements and meta-commands.
169.B \-bail
170Stop after hitting an error.
154.TP
171.TP
172.B \-batch
173Force batch I/O.
174.TP
175.B \-column
176Query results will be displayed in a table like form, using
177whitespace characters to separate the columns and align the
178output.
179.TP
180.BI \-cmd\ command
181run
182.I command
183before reading stdin
184.TP
185.B \-csv
186Set output mode to CSV (comma separated values).
187.TP
155.B \-echo
156Print commands before execution.
157.TP
188.B \-echo
189Print commands before execution.
190.TP
191.BI \-init\ file
192Read and execute commands from
193.I file
194, which can contain a mix of SQL statements and meta-commands.
195.TP
158.B \-[no]header
159Turn headers on or off.
160.TP
196.B \-[no]header
197Turn headers on or off.
198.TP
161.B \-column
162Query results will be displayed in a table like form, using
163whitespace characters to separate the columns and align the
164output.
199.B \-help
200Show help on options and exit.
165.TP
166.B \-html
167Query results will be output as simple HTML tables.
168.TP
201.TP
202.B \-html
203Query results will be output as simple HTML tables.
204.TP
205.B \-interactive
206Force interactive I/O.
207.TP
169.B \-line
170Query results will be displayed with one value per line, rows
171separated by a blank line. Designed to be easily parsed by
172scripts or other programs
173.TP
174.B \-list
175Query results will be displayed with the separator (|, by default)
176character between each field value. The default.
177.TP
208.B \-line
209Query results will be displayed with one value per line, rows
210separated by a blank line. Designed to be easily parsed by
211scripts or other programs
212.TP
213.B \-list
214Query results will be displayed with the separator (|, by default)
215character between each field value. The default.
216.TP
178.BI \-separator\ separator
179Set output field separator. Default is '|'.
217.BI \-mmap\ N
218Set default mmap size to
219.I N
220\.
180.TP
181.BI \-nullvalue\ string
182Set string used to represent NULL values. Default is ''
183(empty string).
184.TP
221.TP
222.BI \-nullvalue\ string
223Set string used to represent NULL values. Default is ''
224(empty string).
225.TP
226.BI \-separator\ separator
227Set output field separator. Default is '|'.
228.TP
229.B \-stats
230Print memory stats before each finalize.
231.TP
185.B \-version
186Show SQLite version.
187.TP
232.B \-version
233Show SQLite version.
234.TP
188.B \-help
189Show help on options and exit.
235.BI \-vfs\ name
236Use
237.I name
238as the default VFS.
190
191
192.SH INIT FILE
193.B sqlite3
194reads an initialization file to set the configuration of the
195interactive environment. Throughout initialization, any previously
196specified setting can be overridden. The sequence of initialization is
197as follows:

--- 19 unchanged lines hidden (view full) ---

217
218o If the -init option is present, the specified file is processed.
219
220o All other command line options are processed.
221
222.SH SEE ALSO
223http://www.sqlite.org/
224.br
239
240
241.SH INIT FILE
242.B sqlite3
243reads an initialization file to set the configuration of the
244interactive environment. Throughout initialization, any previously
245specified setting can be overridden. The sequence of initialization is
246as follows:

--- 19 unchanged lines hidden (view full) ---

266
267o If the -init option is present, the specified file is processed.
268
269o All other command line options are processed.
270
271.SH SEE ALSO
272http://www.sqlite.org/
273.br
225The sqlite-doc package
274The sqlite3-doc package.
226.SH AUTHOR
227This manual page was originally written by Andreas Rottmann
228<rotty@debian.org>, for the Debian GNU/Linux system (but may be used
275.SH AUTHOR
276This manual page was originally written by Andreas Rottmann
277<rotty@debian.org>, for the Debian GNU/Linux system (but may be used
229by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com>.
278by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com> and
279further updated by Laszlo Boszormenyi <gcs@debian.hu> .