MySQL Statement Specification:
1. keyword and function name all uppercase
2. Database name, table name, field name all lowercase
3. The SQL statement must end with a semicolon
4. Comment Statement with "#"
First, the operation of the database
* SHOW {DATABASE | SCHEMA} ;
View a list of data tables under the current server
* Use db_name;
Open Database
* SELECT DATABASE ();
View the currently selected database
* Creat {DATABASE | SCHEMA} [IF not EXIST] db_name;
Create database, inside parentheses to prevent errors
* ALTER {DATABASE | SCHEMA} [db_name];
Modify Database
* DROP {DATABASE | SCHEMA} [IF EXISTS] db_name;
Delete the database, the contents in parentheses to prevent error
Second, Operation data sheet
* creat TABLE [IF not EXISTS] table_name ( column_name data_type , ... ) ;
Create a data table
* SHOW TABLES [from db_name];
View a list of data tables
* SHOW COLUMNS from table_name;
View the data table structure
* SELECT expr ... from table_name;
View selected table
* INSERT [INFO] table_name [( col_name , ... )] VALUES ( val , ... ) ;
Insert record ( column name if omitted, you need to copy all fields )
MySQL Common statements