Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to use' open the database.' The db' suffix executes sql together with the sqlite3 command in Centos6.5?
How to use' open the database.' The db' suffix executes sql together with the sqlite3 command in Centos6.5?
1. Simple sql statement, using:

Create a new database in any directory, such as student.

Command: sqlite3 student.db

The following prompt will appear:

Enter the sql statement create table user (user name text primary key, password text); Building user table

Enter sql statement insert into user values ("Bao Li", "123"); Insert a piece of data.

Enter the sql statement select * from user to view the user table.

Enter the sql statement delete from user, where username =' Bao Li'; Delete the specified record.

Note: Enter the sql command to remember the ending'; Number.

2.SQLite supports the following five data types

1.NULL: null.

2.INTEGER: signed integer, depending on the range of stored numbers.

3. Real number: floating point number, stored as 8-byte IEEE floating point number.

4. Text: string text.

5. Binary objects.

3. Some common commands

View all data tables of the current database:. table

View all current databases:. database

Open or create a table: sqlite3test.db

Visually open the database: sqlitebrowserstudent.db

Note: required: sudoapt-get install SQLite browser.

How to use' open the database.' The db' suffix executes sql together with the sqlite3 command in Centos6.5?

Label: bordercentos6.5 deletes reftps and creates the suffix oneinto.