开发者社区 问答 正文

mybatis配置问题-配置报错

"<pre class=""brush:xml; toolbar: true; auto-links: false;""><select id="searchAnnounce" parameterType="java.util.Map" resultType="CompanyAnnouncement"> <choose> <when test="star_num != null and end_num != null"> SELECT * FROM ( SELECT tb.*, ROWNUM RN FROM ( select <include refid="announcementTableFields" /> from company_announcement where (1=1) and ${_parameter} order by settop desc,creat_dt desc ) tb ) WHERE RN BETWEEN #{star_num} and #{end_num} </when> <otherwise> select <include refid="announcementTableFields" /> from company_announcement where (1=1) and ${_parameter} order by settop desc,creat_dt desc </otherwise> </choose> </select> <pre class=""brush:xml; toolbar: true; auto-links: false;"">### Error querying database.  Cause: java.sql.SQLException: 出现不支持的 SQL92 标记: 195: end_num

The error may involve com.topchoice.smartcompany.dao.impl.AnnounceMentMapper.searchAnnounce-Inline

The error occurred while setting parameters

Cause: java.sql.SQLException: 出现不支持的 SQL92 标记: 195: end_num

; uncategorized SQLException for SQL []; SQL state [null]; error code [17034]; 出现不支持的 SQL92 标记: 195: end_num; nested exception is java.sql.SQLException: 出现不支持的 SQL92 标记: 195: end_num" ![image.png]

展开
收起
montos 2020-06-01 21:15:59 679 分享 版权
1 条回答
写回答
取消 提交回答
  • 应该是sql语句出问题了吧,通过日志把执行的sql打出来,然后拿出来执行SQL看看!

    2020-06-01 21:16:09
    赞同 展开评论