SQL Plus - WHENEVER SQLERROR

> Procedural Languages > (SQL Plus|SqlCl) (Oracle Database Console)

1 - About

It performs the specified action (exits SQL*Plus by default) if a SQL command or PL/SQL block generates an error.

Advertising

3 - Syntax

WHENEVER SQLERROR 
     {
        EXIT [SUCCESS|FAILURE|WARNING|n|variable|:BindVariable][COMMIT|ROLLBACK] 
        | 
        CONTINUE [COMMIT|ROLLBACK|NONE]
     }

where:

4 - Example

WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK
lang/sqlplus/whenever_sqlerror.txt · Last modified: 2017/05/09 16:51 by gerardnico