
写一个错误的过程试试,put_line,写成了pput,直接显示编译错误,但没有详细信息
解决:
通过
select * from sys.user_errors where name="对象名大写";
可以查询

第一次没有大写,查询不了,改成大写即可,或则使用upper函数
附上自己写的一个用来查询错误的过程(see error);
create or replace procedure seee(n sys.user_errors.name%type) as
temp sys.user_errors%rowtype;
cursor errors (name sys.user_errors.name%type) is select * from sys.user_errors where name=upper(name);
ind number:=0;
begin
open errors(n);
dbms_output.put_line('查询到的编译错误如下;');
loop
fetch errors into temp;
exit when errors%NOTFOUND;
dbms_output.put_line(ind||'. '||temp.type ||':'||temp.name||'-----'||temp.text);
ind:=ind+1;
end loop;
end;
使用方法
execute seee('名字');
PL/SQL错误查询过程
本文介绍了一个PL/SQL过程,用于查询Oracle数据库中的编译错误。通过使用upper函数进行大小写转换,此过程能够帮助开发者更有效地定位并解决编译错误。
1855

被折叠的 条评论
为什么被折叠?



