declare
type errcodes is table of int;
ec errcodes := errcodes (1917, 1939, 1031);
begin
for i in 1..ec.count loop
dbms_output.put_line (sqlerrm(-ec(i))); end loop;
end;
/
ORA-01917: user or role '' does not exist
ORA-01939: only the ADMIN OPTION can be specified
ORA-01031: insufficient privileges
是的,有这样一个功能 - SQLERRM: