mysql中order不要作为字段

作者:guoxj
浏览:474

 

### Error querying database. 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 'order from screen_video) tmp_count' at line 1 ### The error may exist in file [\rtservice\target\classes\mybatis\system\ScreenVideoMapper.xml] ### The error may involve com.rtsys.project.system.mapper.ScreenVideoMapper.selectScreenVideoList-Inline ### The error occurred while setting parameters ### SQL: select count(0) from (select id, source_name, source_url, order from screen_video) tmp_count ### 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 'order from screen_video) tmp_count' at line 1 ; 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 'order from screen_video) tmp_count' at line 1

    报错中order字段不是一个合适的字段名,mybatis查询时过不去,加上一个前缀即可




登录后回复

共有0条评论