无法在mysql中选择表

时间:2015-02-13 09:22:08

标签: mysql

这是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

我做错了什么?我可以选择所有其他表格。

2 个答案:

答案 0 :(得分:4)

releasereserved keyword in MySQL,需要通过反引号进行转义。

select * from `release`;

答案 1 :(得分:0)

releasereserved word。使用反引号arround或更好地更改表名。

select * from `release`;