create table errors (code number,message varchar2(1000))
truncate table errors;
--测试用
DECLARE
msg CHAR(1000);
BEGIN
FOR num IN 1..100000 LOOP
msg := SQLERRM(-num); -- should be SQLERRM(-num)
if INSTR(msg,'not found',1) > 0 then
null;
else
if INSTR(msg,'non-ORACLE',1) > 0 then
null;
else
INSERT INTO errors VALUES (num,msg);
end if;
end if ;
END LOOP;
commit;
END;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70612/viewspace-1019099/ ,如需转载,请注明出处,否则将追究法律责任。