不小心将 Mysql 关键字作为表名列名
问题缘由:
@Select("select * from member where id = #{id}")
异常出现:
SQL]SELECT order from bas_dictionary
[Err] 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 'member from bas_dictionary' at line 1
解决办法:
在关键字中添加反引号 `
@Select("select * from `member` where id = #{id}")