| 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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access