0% found this document useful (0 votes)
95 views2 pages

Sqlite

The sqlite3 command line utility allows users to manually enter and execute SQL statements against an SQLite database. It can be started by typing "sqlite3" followed optionally by a database file name, and will then prompt the user to enter SQL statements terminated with a semicolon to execute them. The sqlite3 program ends when the user inputs their system's end-of-file character, usually Control-D.

Uploaded by

Harsha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views2 pages

Sqlite

The sqlite3 command line utility allows users to manually enter and execute SQL statements against an SQLite database. It can be started by typing "sqlite3" followed optionally by a database file name, and will then prompt the user to enter SQL statements terminated with a semicolon to execute them. The sqlite3 program ends when the user inputs their system's end-of-file character, usually Control-D.

Uploaded by

Harsha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL

(Taken from the documentation available at http://sqlite.org/cli.html)

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:

sqlite> CREATE TABLE tbl2 (

...> f1 varchar(30) primary key,

...> f2 text,

...> f3 real

...> );

sqlite>

You might also like