Error-Reporting Functions

PL/SQL has two error-reporting functions, SQLCODE and SQLERRM, for use in PL/SQL exception-handling code.

For their descriptions, see "SQLCODE Function" and "SQLERRM Function".

You cannot use the SQLCODE and SQLERRM functions in SQL statements.