Basic MySQL database commands
Mysql-uroot-p password // Login
Creat database people; // create
Drop DATABASE name // Delete
Show databases // view all databases
Use Database Name // use a database show tables // display all tables in the current database
Desc table name // view the attributes of the current table
Create table Name (// create a new table attribute data type Remarks ,...);
Insert into Table Name (Field 1, field...) values (Field 1 value,...) // insert
Select from * user; // query all data stored in the table
Delete from table name where id = 2 (delete condition) // delete table records according to the condition
Delete from table name // delete a whole table
Update table name set element = .... Where id = .. // modify the record. If the where table is not added, the whole table will change.
Select variable ..... From table name; // simple query
Select * from table name // flexible query
Select * from user where name like '% %' or password like '% 8080' // query the characters with a king in name or 123% in password
Select * from user limit; // obtain five records from the beginning