ArticleDirectory
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.