![]() Query results will be displayed with one value per line, rows separated by a blank line. Query results will be output as simple HTML tables. column Query results will be displayed in a table like form, using whitespace characters to separate the columns and align the output. init file Read and execute commands from file, which can contain a mix of SQL statements and meta-commands. timeout MS Try opening locked tables for MS milliseconds tables ?PATTERN? List names of tables matching a LIKE pattern show Show the current values for various settings separator STRING Change separator used by output mode and. schema ?TABLE? Show the CREATE statements prompt MAIN CONTINUE Replace the standard prompts nullvalue STRING Print STRING in place of NULL values mode MODE ?TABLE? Set output mode where MODE is one of:Ĭolumn Left-aligned columns. indices TABLE Show names of all indices on TABLE import FILE TABLE Import data from FILE into TABLE ![]() header(s) ON|OFF Turn display of headers on or off explain ON|OFF Turn output mode suitable for EXPLAIN on or off. databases List names and files of attached databases Meta-commands are always prefixed with a dot (.).Ī list of available meta-commands can be viewed at any time by issuing the '.help' command. Perform administrative operations upon the attached databases (such as rebuilding indices). SQLITE META-COMMANDS The interactive interpreter offers a set of meta-commands that can be used to control the output format, examine the currently attached database files, or $ sqlite3 -line mydata.db 'select * from memos where priority > 20 ' Multiple statements should be separated by semi-colons. Optionally, a SQL statement or set of SQL statements can be supplied as a single argument. This is useful for migrating data between databases, possibly changing the schema along the way. ![]() Multiple databases within the same interactive session. If no database name is supplied, the ATTACH sql command can be used to attach to existing or create new database files. Sqlite> insert into memos values('lunch with Christine', 100) Sqlite> insert into memos values('deliver project description', 10) Sqlite> create table memos(text, priority INTEGER) If the database file does exist, it will be opened.įor example, to create a new database file named "mydata.db", create a table named "memos" and insert a couple of records into that table: If the database fileĭoes not exist, it will be created. To start a sqlite3 interactive session, invoke the sqlite3 command and optionally provide the name of a database file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |