当前位置:   article > 正文

mybatis的exception:net.sf.jsqlparser.parser.ParseException问题之一解决_exception: net.sf.jsqlparser.parser.parseexception

exception: net.sf.jsqlparser.parser.parseexception: encountered unexpected t
  1. optimize this sql to a count sql has exception, sql:"select a.id,
  2. a.code,
  3. a.title,
  4. a.text,
  5. a.body,
  6. CONCAT(?,b.img) as img,
  7. a.commend,
  8. a.tag,
  9. (select sum(viewcount) from tb_video_url c where c.video_id = a.id and c.close = 0) as viewcount
  10. from tb_video a
  11. left join tb_facepic b on b.obj = 'video' and a.id = b.obj_id and del = 0
  12. where a.close = 0
  13. order by commend desc ,a.id desc", exception:
  14. net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "select" <K_SELECT>
  15. at line 9, column 17.
  16. Was expecting one of:
  17. "!"
  18. "("
  19. "NOT"

遇到的mybatis的exception:net.sf.jsqlparser.parser.ParseException问题之一解决

解决: 把两个close加上``,就不报错了,可能是因为关键字的问题

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/894168
推荐阅读
相关标签
  

闽ICP备14008679号