Oracle“ORA-00911:⽆效字符”解决⽅式在⼯作中碰到ORA-00911:⽆效字符的问题,
代码如下:
<select id="querySendMsg" parameterType="map" resultMap="sendMsgResult">
ployee_code,t.phone_no,t.wechat_ployee_name,t.send_msg,t.send_time from itsc_msg_abnormal_record t
derNo in
<foreach item="item" index="index" collection="orderNoList" open="(" separator="," close=")">
#{item}
</foreach>;
</select>
错误如下:
### The error occurred while setting parameters
### SQL: select t.* from itsc_msg_abnormal_record t derNo in ( ? , ? ) ;
### Cause: java.sql.SQLSyntaxErrorException: ORA-00911: ⽆效字符
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: ⽆效字符
syntaxerror是什么错误发现是在select语句末尾多加了⼀个分号';'
去掉即可
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论