sqlite-commands (such as. help)

Source: Internet
Author: User
Tags create index sqlite

Command:

Example

Output Help information Sqlite>.help

(Note the character '. ' Before the command) :

View database file Information command: sqlite>.database

View creation statements for all tables: Sqlite>.schema

View the creation statement for the specified table: Sqlite>.schema table_name

Sqlite>. Schema

CREATE TABLE mytable (ID integer primary key,value text); CREATE TABLE TBL1 (one varchar (ten), smallint, email text ' Collate nocase, others text '); CREATE INDEX Test_idx on TBL1 (both); CREATE VIEW Tbl1view as SELECT * from TBL1; CREATE TABLE t_table1 (name text,age interger, num); CREATE INDEX T_table1_index on T_table1 (name);

Table contents are listed as SQL statements: Sqlite>.dump table_name

To set the delimiter for displaying information: Sqlite>.separator symble

Example: Set display information to ': ' to separate sqlite>.separator:

Set display mode: Sqlite>.mode mode_name

Example: The default is List, set to column, and other modes are available through. Help view mode related content Sqlite>.mode columnsqlite> select * from T_table1;name Num----------------------------xinxin 8 1wangwu 20lisi 20libai 200

Set the display width for each column: Sqlite>.width width_value

Example: Set width to 2sqlite>.width 2

Lists the configuration for the current display format: sqlite>.show

Sqlite>. Show Echo:off explain:off headers:on mode:columnnullvalue: "" Output:stdoutseparator: "|" Stats:on width:

Exit the SQLite Terminal command: Sqlite>.quit or Sqlite>.exit

sqlite-commands (such as. help)

Related Article

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.