存储过程中出现未找到任何数据
坠落尘埃 2016-02-02 05:49:16 在执行存储过程中发现了ORA-01403: 未找到任何数据,但是把那段sql打印出来放到命令行运行是有数据的。且该用户具有dba权限,同时也授权了grant select any dictionary to xxx;代码如下:
create or replace procedure test
AUTHID CURRENT_USER as
v_error_col varchar2(1000);
begin
select g.column_name
into v_error_col
from (select r.owner, r.TABLE_NAME, t.COLUMN_NAME
from dba_tables r, dba_tab_columns t
where r.TABLE_NAME = t.TABLE_NAME) g,
dba_col_comments l
where g.table_name = l.table_name
and g.owner=l.owner
and g.column_name = l.column_name
and l.comments =参数
and g.owner =参数
and g.table_name = upper(参数)
group by g.column_name;
dbms_output.put_line(v_error_col);
end;
这个到底是什么原因造成的。