在工作中碰到ORA-00911:无效字符的问题,

代码如下:

select t.employee_code,t.phone_no,t.wechat_id,t.employee_name,t.send_msg,t.send_time from itsc_msg_abnormal_record t

where t.orderNo in#{item};

错误如下:

### The error occurred while setting parameters

### SQL: select t.* from itsc_msg_abnormal_record t where t.orderNo in ( ? , ? ) ;

### Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符

发现是在select语句末尾多加了一个分号‘;‘

去掉即可

原文:https://www.cnblogs.com/MrZhaoyx/p/11804652.html

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐