SQL Notebook (logo)

TRY/CATCH Statement

Executes the stmt-to-try statements in order until successful completion or until one of the statements throws an error. If an error is thrown, then stmt-if-error statements are executed. The statements in the CATCH block may use the ERROR_NUMBER, ERROR_MESSAGE, and ERROR_STATE functions to access the thrown error information.

Syntax

Syntax for the TRY/CATCH statement

Arguments

Examples