create table `create` (
-> id int
-> );
Query OK, 0 rows affected (0.03 sec)
mysql> desc create;
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'create' at line 1
mysql> desc `create`;
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
+-------+---------+------+-----+---------+-------+
1 row in set (0.04 sec)
MySQL表名涉及关键字,用反引号引起来
最新推荐文章于 2022-05-16 00:29:37 发布