WHENEVER SQLERROR |
WHENEVER SQLERROR {EXIT {SUCCESS | FAILURE | n | var | :bind_variable} [COMMIT | ROLLBACK] | CONTINUE [COMMIT | ROLLBACK | NONE] } |
Specifies the action to be taken by SQL*Plus if an error is generated by a SQL statement or a PL/SQL block.
Keywords
EXIT
Directs SQL*Plus to exit as soon as a SQL or PL/SQL error is detected.
COMMIT
Directs SQL*Plus to execute a COMMIT before exiting or continuing after a SQL or PL/SQL error is detected.
CONTINUE
Turns off the EXIT option.
FAILURE
Exits with a return code indicating failure.
n
A specific numeric return code to be returned.
NONE
Directs SQL*Plus to take no action after a SQL or PL/SQL error.
ROLLBACK
Directs SQL*Plus to execute a ROLLBACK before exiting or continuing after a SQL or PL/SQL error is detected.
SUCCESS
Exits normally with a return code indicating success. This option is the default behavior.
var
A user-defined or system variable, the value of which will be used as the return code.
bind_variable
A bind variable, created in SQL*Plus with the VARIABLE command, the value of which will be used as a return code.
WARNING
Exits with a return code indicating a warning status.
Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.