这是mysql表:
+---------------------+
| Tables_in_myproject |
+---------------------+
| reds |
| zxy |
| abcd |
| release |
+---------------------+
4行(0.46秒)
当我尝试选择或显示发布表时,会抛出以下错误:
mysql> select * from release;
ERROR 1064 (42000): 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 'release' at line 1
我做错了什么?我可以选择所有其他表格。
答案 0 :(得分:4)
release
是reserved keyword in MySQL,需要通过反引号进行转义。
select * from `release`;
答案 1 :(得分:0)
release
是reserved word。使用反引号arround或更好地更改表名。
select * from `release`;