SQLite3 Command Line Operations Guide _sqlite

Source: Internet
Author: User

. Help
View Help information

. backup? Db? FILE
Back up the database by:. Backup [main| ...] filename, the database name can be obtained by the. databases command, usually main, can be omitted, filename is the disk filename.

. Bail on| Off
No longer continues when an error is encountered, and the default is off

. databases
Lists the databases and files attached to the database

. Dump? TABLE? ...
Save the table in a file in SQL format without specifying the name of the tables. If you want to save to disk, you need to combine the. Output command.

. Echo on| Off
Turn command line echo on/off

. exit
Exit the command line

. Explain? on| Off?
Displays the header in the appropriate way, with no arguments open

.header<s> On;off
Whether to display headers, and. Explain the difference is not very big

. Help
Display Help information

. Import FILE TABLE
Import a table from a file

. Indices? TABLE?
Display Index

. Load FILE? ENTRY?
Load an extension library

. Log File|off
Whether log is logged, file can be standard output/input

. Mode mode? TABLE?
To set the output mode, the pattern can be as follows:
CSV comma-separated values
Column header left-aligned (see. width)
HTML Display HTML code
Insert SQL Insertion Statement
Line one value
List values are separated by a string
Tabs a tab-delimited value
Tcl TCL list Element

. Nullvalue STRING
Output with STRING instead of NULL value

. Output FILENAME
Output to a file instead of appearing on the screen

. Output stdout
Output to the screen

. prompt MAIN CONTINUE
Replace the default command prompt information by default sqlite>

. Quit
Exit command Line

. Read FILENAME
Execute SQL in FILENAME

. Restore? Db? FILE
Restore data to a table from a file, the default table is main

. Schema? TABLE?
Show CREATE statement

. Timeout MS
Attempt to open a locked table during MS time

. vfsname? AUX?
displaying VFS stack information

. width NUM1 NUM2 ...
Set the width of columns in column mode

. Timer on| Off
Show CPU Time

Other:
See SQLITE3 Official Command Manual
For example, cacuum can free up disk space ...

and other:
Execute the SQL statement

--end of file--

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.