Sqlite3 command Line

Source: Internet
Author: User

1. View version Information
Sqlite3-verion

2. Create/Open Database
Sqlite3 database name
Example: Sqlite3 test.db
If Test.db does not exist, create
If present, open the
3. Exit
. q/.exit
4. List the current display format
. Show
. Output/home/csgec/msql.sql//Rewrite the output to the specified file
. Headers on
. Mode column

5. See what tables are in the database
. tab

6. Display the table structure (that is, the CREATE statement of the view table)
. schema [table name]

7. Data backup
1.CP xxx.db Xxx.db.bak Backup Database
2.. backup filename backs up the database for the specified file
3. Backup table
1.. output/home/csgec/table_user.txt
2.. dump User_table
3.. q

4. Restore a backed up table
. read/home/csgec/table_user.txt


8. Save the personal configuration in the. sqliterc file
Vim ~/.sqliterc
. Headers on
. Mode column

9. Help
. Help

Sqlite3 command Line

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.