oracle异常 无效的字符,Oracle“ORA-00911: 无效字符”解决方式

本文解决了一个常见的Oracle数据库错误ORA-00911:无效字符。问题出现在SQL查询中多余的分号。通过删除这个多余的分号,成功解决了错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在工作中碰到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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值