1, in MySQL, the reserved word can not be used as table name, field name, etc., as follows:
Mysql> ALTER TABLE student ADD column desc varchar (+) after name;
1064-you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' desc-varchar ' after NA Me ' at line 1
2, how to solve this problem?
A. Use other words
B. Use inverted quotes to tell MySQL not to interpret it as a reserved word. As follows:
Mysql> ALTER TABLE student add column ' desc ' varchar (+) after name;
Query OK, 1 row affected
3. If there is a reserved word for the table name or field name, there will be a problem with the exported SQL script, and the import will be wrong. How to solve this problem?
MySQL's SQL script, with the table name and field name, is inverted with quotation marks.
MySQL Inverted quote