The SQLERRM Function in Oracle SQL / PLSQL is used to get the error message related with the latest generated exception. The SQLERRM 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 […]