Return to Snippet

Revision: 71351
at February 21, 2017 13:19 by bbrumm


Initial Code
/*
SQLCODE Examples
*/

EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('An error was encountered: '||SQLCODE||' - '||SQLERRM);
END;



EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20010, 'An error was encountered: '||SQLCODE||' - '||SQLERRM);
END;


EXCEPTION
WHEN OTHERS THEN
errorcode := SQLCODE;
errormessage := SQLERRM;

INSERT INTO error_log (error_number, error_message, function_name)
VALUES (errorcode, errormessage, 'thisFunction');

END;

Initial URL
http://www.databasestar.com/oracle-sqlcode/

Initial Description
A few examples of the SQLCODE function.

Initial Title
Oracle SQLCODE Function

Initial Tags
sql, Oracle

Initial Language
SQL