|
Getting started
sqlite3 works with a local database file. Within this local database,
multiple tables can be created. SQL commands are case insensitive, but are
shown here in upper case. Dot commands are case sensitive.
A command history is kept in ~/.sqlite_history
A config file can be established as ~/.sqliterc. It should
generally only contain meta-commands.
To invoke sqlite in interactive mode use:
$ sqlite3
To quit interactive mode use one of:
sqlite> .q
sqlite> .quit
sqlite> .exit
sqlite> ^D
To invoke sqlite in interactive mode and also create or use an existing database:
$ sqlite3 </path/to/database/file>
$ sqlite3 /home/me/mydata.db
To create or use an existing database from interactive mode:
sqlite> ATTACH DATABASE "<path/to/database/file>" AS <alias>
To get help on the dot commands use:
sqlite> .help
|