ITeye博客

ORA-01422: 实际返回的行数超出请求的行数

ozzzo · 2009-07-22 15:28 · ORACLE · Markdown

在ORACLE的存储过程 或是触发器中使用类似

 

select t.ajay into aytemp from t_xyr_collect t where t.c_ahpx like '%'||xyrbh||'%' ;

 

的语句时,可能会出现ORA-01422: 实际返回的行数超出请求的行数 的错误

 

解决办法:在条件后加上  and rownum=1

 

如:

select t.ajay into aytemp from t_xyr_collect t where t.c_ahpx like '%'||xyrbh||'%' and rownum=1;

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。