Download sqlite-3.6.tar.gz unzip and copy it to the directory where you want to install it, I chose the usrlocalsqlite-3.3.6 and then in the terminal: # cdusrlo
Download the sqlite-3.3.6.tar.gz unzip and copy it to the directory you want to install, I chose/usr/local/sqlite-3.3.6 and then in the terminal: # cd/usr/lo
Download sqlite-3.3.6.tar.gz
Decompress and copy to the directory where you want to install it. What I chose is/usr/local/sqlite-3.3.6.
Then in the terminal:
# Cd/usr/local/sqlite-3.3.6
#./Configure
# Make
# Make install
# Make doc
An error is prompted during make.
../Sqlite-3.3.6/src/tclsqlite. c: In function 'dbupdatehandler ':
../Sqlite-3.3.6/src/tclsqlite. c: 333: warning: passing arg 3 of 'tcl _ ListObjAppendElement 'makes pointer from integer without a cast
......
This is a tcl-related error. You can first install ActiveTcl to solve it. If you do not need tcl support, this error can be avoided as follows:
#./Configure -- disable-tcl -- prefix =/usr/local/sqlite-3.3.6
# Make: If no file can be compiled is prompted, it is the first time make has been executed, and then the following is done. If this is the first compilation, no error will be prompted.
# Make install
# Make doc
Test whether the installation is successful
# Cd/usr/lcoal/sqlite-3.3.6
#./Sqlite3 text. db // This is also the way to enter the database
If the installation is successful, the following information appears:
SQLite version 3.3.6
Enter ". help" for instructions
Sqlite>
Next, you can operate it as you would on windows.
Ii. Basic SQLite operations
Perform the following operations: Create a table, insert, and query:
Sqlite> create table tbl1 (one varchar (10), two smallint );
Sqlite> insert into tbl1 values ('Hello! ', 10 );
Sqlite> insert into tbl1 values ('Goodbye ', 20 );
Sqlite> select * from tbl1;
Hello! | 10
Goodbye | 20
Sqlite>
Note that the semicolon must be included after each SQL statement.
Special commands to sqlite3:
Sqlite>. help
. Databases List names and files of attached databases
. Exit Exit this program
. Output FILENAME Send output to FILENAME
. Output stdout Send output to the screen
. Tables List the tables
,