Open the database:
USE db_name : Open the database.
Create the data table:
Check out the datasheet:
View the data table structure:
Simple insertion and search of data:
- Insert: INSERT [INTO] tbl_name [(col_name)] VALUES(val1,val2,...);
- Find: SELECT expression FROM tbl_name
Null and non-null:
- If you do not specify empty and non-empty when creating a table, it can be empty by default.
- When creating a table, you can add some corresponding attributes after the column name-data type
auto numbering:
Getting to know the primary key:
Primary key is not null
Unique constraint:
UNIUE KEY can be empty
Default constraints:
example:
Record lookup:
View data table structure
- create: