Linux SQLite Installation

Source: Internet
Author: User
Tags sqlite database
ArticleDirectory
    • I. Software Packages
I. Software Packages

A) sqlite-autoconf-3070400.tar.gz

Ii. Installation Steps

A) tar zxvf sqlite-autoconf-3070400.tar.gz

B) CD sqlite-autoconf-3070400

C)./configure -- prefix =/usr/local/SQLite

D) Make

E) make install

Iii. sqlite3 commands

A)/usr/local/SQLite/bin/sqlite3 user. DB create a database

B) view help

SQLite version 3.3.6

Enter ". Help" for instructions

SQLite>. Databases

SEQ name file

----------------------------------------------------------------------------

0 main/usr/local/SQLite/bin/userdb

SQLite>. Help

. Databases list names and files of attached Databases

. Dump? Table? ... Dump the database in an SQL text format

. Echo on | off turn command echo on or off

. Exit exit this program

. Explain on | off turn output mode suitable for explain on or off.

. Header (s) on | off turn display of headers on or off

. Help show this message

. Import file table import data from file into table

. Indices table show names of all indices on table

. Mode mode? Table? Set output mode where mode is one:

CSV comma-separated values

Column left-aligned columns. (See. width)

HTML <Table> code

Insert SQL insert statements for table

Line one value per line

List values delimited by. Separator string

Tabs tab-separated values

TCL list elements

. Nullvalue string print string in place of null values

. Output Filename send output to filename

. Output stdout send output to the screen

. Prompt main continue Replace the standard prompts

. Quit exit this program

. Read filename Execute SQL in Filename

. Schema? Table? Show the create statements

. Separator string change Separator Used by output mode and. Import

. Show show the current values for various settings

. Tables? Pattern? List names of tables matching a like pattern

. Timeout MS try opening locked tables for MS milliseconds

. Width num... Set column widths for "column" Mode

SQLite> select * from students;

Name | age | sex | ID

Sadgsd | 1 | 2 | 1

Sadgsd | 1 | 2 | 2

Sadgsd | 1 | 2 | 3

Sdagds | 2 | 1 | 4

Sdagdsg | 12 | 1 | 6

Sdagdsg | 12 | 1 | 7

Sdagdsg | 12 | 1 | 9

Sdagdsg | 12 | 1 | 16

SQLite>. Dump>/opt/a. SQL export data

C) SQLite>. Quit exit

D) All internal commands of SQLite are not added at the end; No. Must be added for SQL statements; No.

E) when data is inserted in the SQLite database, an error is reported because the SQLite database file has no permission to write. You can modify the File Permission.

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.