aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/sqlite3.1
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/sqlite3.1
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.zip
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/sqlite3.1')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/sqlite3.1229
1 files changed, 229 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/sqlite3.1 b/libraries/sqlite/unix/sqlite-3.5.1/sqlite3.1
new file mode 100644
index 0000000..785995b
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/sqlite3.1
@@ -0,0 +1,229 @@
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"
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
14.\" .fi enable filling
15.\" .br insert line break
16.\" .sp <n> insert n+1 empty lines
17.\" for manpage-specific macros, see man(7)
18.SH NAME
19.B sqlite3
20\- A command line interface for SQLite version 3
21
22.SH SYNOPSIS
23.B sqlite3
24.RI [ options ]
25.RI [ databasefile ]
26.RI [ SQL ]
27
28.SH SUMMARY
29.PP
30.B sqlite3
31is a terminal-based front-end to the SQLite library that can evaluate
32queries interactively and display the results in multiple formats.
33.B sqlite3
34can also be used within shell scripts and other applications to provide
35batch processing features.
36
37.SH DESCRIPTION
38To start a
39.B sqlite3
40interactive session, invoke the
41.B sqlite3
42command and optionally provide the name of a database file. If the
43database file does not exist, it will be created. If the database file
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
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);
61.br
62sqlite>
63.B insert into memos values('lunch with Christine', 100);
64.br
65sqlite>
66.B select * from memos;
67.br
68deliver project description|10
69.br
70lunch with Christine|100
71.br
72sqlite>
73.sp
74
75If no database name is supplied, the ATTACH sql command can be used
76to attach to existing or create new database files. ATTACH can also
77be used to attach to multiple databases within the same interactive
78session. This is useful for migrating data between databases,
79possibly changing the schema along the way.
80
81Optionally, a SQL statement or set of SQL statements can be supplied as
82a single argument. Multiple statements should be separated by
83semi-colons.
84
85For example:
86.sp
87$
88.B sqlite3 -line mydata.db 'select * from memos where priority > 20;'
89.br
90 text = lunch with Christine
91.br
92priority = 100
93.br
94.sp
95
96.SS SQLITE META-COMMANDS
97.PP
98The interactive interpreter offers a set of meta-commands that can be
99used to control the output format, examine the currently attached
100database files, or perform administrative operations upon the
101attached databases (such as rebuilding indices). Meta-commands are
102always prefixed with a dot (.).
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.databases List names and files of attached databases
112.dump ?TABLE? ... Dump the database in an SQL text format
113.echo ON|OFF Turn command echo on or off
114.exit Exit this program
115.explain ON|OFF Turn output mode suitable for EXPLAIN on or off.
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
119.indices TABLE Show names of all indices on TABLE
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.nullvalue STRING Print STRING in place of NULL values
130.output FILENAME Send output to FILENAME
131.output stdout Send output to the screen
132.prompt MAIN CONTINUE Replace the standard prompts
133.quit Exit this program
134.read FILENAME Execute SQL in FILENAME
135.schema ?TABLE? Show the CREATE statements
136.separator STRING Change separator used by output mode and .import
137.show Show the current values for various settings
138.tables ?PATTERN? List names of tables matching a LIKE pattern
139.timeout MS Try opening locked tables for MS milliseconds
140.width NUM NUM ... Set column widths for "column" mode
141sqlite>
142|cc .
143.sp
144.fi
145
146.SH OPTIONS
147.B sqlite3
148has the following options:
149.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.
154.TP
155.B \-echo
156Print commands before execution.
157.TP
158.B \-[no]header
159Turn headers on or off.
160.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.
165.TP
166.B \-html
167Query results will be output as simple HTML tables.
168.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
178.BI \-separator\ separator
179Set output field separator. Default is '|'.
180.TP
181.BI \-nullvalue\ string
182Set string used to represent NULL values. Default is ''
183(empty string).
184.TP
185.B \-version
186Show SQLite version.
187.TP
188.B \-help
189Show help on options and exit.
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:
198
199o The default configuration is established as follows:
200
201.sp
202.nf
203.cc |
204mode = LIST
205separator = "|"
206main prompt = "sqlite> "
207continue prompt = " ...> "
208|cc .
209.sp
210.fi
211
212o If the file
213.B ~/.sqliterc
214exists, it is processed first.
215can be found in the user's home directory, it is
216read and processed. It should generally only contain meta-commands.
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
225The sqlite-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
229by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com>.