The SQLCODE Function in Oracle SQL / PLSQL is used to get the error number related with the latest generated exception. The SQLCODE function should be used in the exception handling segment of the code. A typical exception handling portion of code may look like; EXCEPTION WHEN exception_name1 THEN [Statements / business logic] WHEN exception_name2 […]