PLS-00103: 出现符号 ")"在需要下列之一时

执行 Oracle 存储过程时,出现 “PLS-00103: 出现符号 ")"在需要下列之一时:”,

Cause: java.sql.SQLException: ORA-06550: 第 22 行, 第 4 列:
PLS-00103: 出现符号 ")"在需要下列之一时:
 ( - + case mod new not null
   <an identifier> <a double-quoted delimited-identifier>
   <a bind variable> continue avg count current exists max min
   prior sql stddev sum variance execute forall merge time
   timestamp interval date
   <a string literal with character set specification>
   <a number> <a single-quoted SQL string> pipe
   <一个带有字符集说明的可带引号的字符串文字>
   <一个可带引号的 SQL 字符串> purge
符号 "null" 被替换为 ")" 后继续。

; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-06550: 第 22 行, 第 4 列: 
PLS-00103: 出现符号 ")"在需要下列之一时:
 ( - + case mod new not null
   <an identifier> <a double-quoted delimited-identifier>
   <a bind variable> continue avg count current exists max min
   prior sql stddev sum variance execute forall merge time
   timestamp interval date
   <a string literal with character set specification>
   <a number> <a single-quoted SQL string> pipe
   <一个带有字符集说明的可带引号的字符串文字>
   <一个可带引号的 SQL 字符串> purge
符号 "null" 被替换为 ")" 后继续。

image

解决方案

很坑,参数最后多了个,逗号。 call setStatus('a','b',)
还有就是每个参数的数据类型要确保正确对应
按上面的规则,检查自己的入参,大概率是不起眼的一个小坑,把自己坑了

posted @ 2023-08-31 09:03  VipSoft  阅读(531)  评论(0编辑  收藏  举报