Sqlite
Sqlite
The SQLite project provides a simple command-line utility named sqlite3 (or
sqlite3.exe on Windows) that allows the user to manually enter and execute
SQL statements against an SQLite database.
To start the sqlite3 program, simply type "sqlite3" at the command prompt.
The "sqlite3" command may be optionally followed by the name the file that
holds the SQLite database. If the file does not exist, a new database file with
the given name will be created automatically. If no database file is specified
on the command-line, a temporary database is created, then deleted when
the "sqlite3" program exits.
On start-up, the sqlite3 program will show a brief banner message then
prompt you to enter SQL. Type in SQL statements (terminated by a
semicolon), press "Enter" and the SQL will be executed.
You can terminate the sqlite3 program by typing your system End-Of-File
character (usually a Control-D). Use the interrupt character (usually a
Control-C) to stop a long-running SQL statement.
Make sure you type a semicolon at the end of each SQL command! The
sqlite3 program looks for a semicolon to know when your SQL command is
complete. If you omit the semicolon, sqlite3 will give you a continuation
prompt and wait for you to enter more text to be added to the current SQL
command. This feature allows you to enter SQL commands that span
multiple lines. For example:
...> f2 text,
...> f3 real
...> );
sqlite>