MySQL中的describe是预留关键字

今天写代码时,遇到一个插入错误,总是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 'describe,createuser,status),我用的是mybatis,所以写SQL语句的时候尝试删掉某字段,最后发现原来是describe在作怪,于是把describe改成describes,再尝试,就可以可以正常插入了。后来百度一下,describe竟然是mysql中的关键词,so,我们不能用这个词作为数据库中的字段名称了。

你可能感兴趣的:(MySQL中的describe是预留关键字)