将一张表的内容进行增删改查接口的时候,出现了一个问题,如图

 报错代码如下:

Cause: java.sql.SQLSyntaxErrorException: 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 , CREATE_TIME,
    CREATED, UPDATE_TIME, UPDATED
   
    from renew_rul' at line 3
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: 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 , CREATE_TIME,
    CREATED, UPDATE_TIME, UPDATED
   
    from renew_rul' at line 3 

提示我的sql语法异常,网上找了很久,没找到类似的问题,特地记录一下,

用的数据库是mysql,数据库图形化界面navicat。

 

出问题的原因是DESCRIBE是关键字,在mybatis里面还得进一步处理,但奇怪的是status应该也是关键字啊,为甚么它不报错?

解决办法:将DESCRIBE这个字段改成了DES,这样就能编译通过了。