Basic management statements for libraries
SHOW DATABASES; # Show All Libraries
Create database name;
Show create database name; # Display library creation information
drop database name; # Delete Library
Use library name; Enter database
Basic management statements for tables
SHOW TABLES; # Show All Tables
CREATE table table name (columns); # Create a table
Show create table table name;
drop table name; # Delete Tables
increase, delete, change and check the data in a single table:
Select ID from test; # Query ID from the test table;
Increase
mysql> INSERT into Test (ID) value (1);
mysql> INSERT INTO Test (id,name) value (2, ' Zhang San ');
mysql> INSERT INTO test values (3, ' John Doe '), (4, ' Harry ');
mysql> INSERT INTO set id=6,name= ' micro ';
Inquire
mysql> Select *from test; # query All
Mysql> Select *from test where id=2;
Modify
Update test set name= ' Zhang San ' where id=1; the name of the #把id =1 is changed to ' Zhang San ', without the ' where ' condition all replaced with Zhang San
Delete
Delete from test where id=1; #不加 ' where ' condition is completely deleted
The basic operation of MySQL