About
It performs the specified action (exits SQL*Plus by default) if a SQL command or PL/SQL block generates an error.
Articles Related
Syntax
WHENEVER SQLERROR
{
EXIT [SUCCESS|FAILURE|WARNING|n|variable|:BindVariable][COMMIT|ROLLBACK]
|
CONTINUE [COMMIT|ROLLBACK|NONE]
}
where:
- n is a number
- variable is a substitution variable
- BindVariable is a Bind Variable
Example
WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK