SQL Plus - WHENEVER SQLERROR

Card Puncher Data Processing

About

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

Syntax

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

where:

Example

WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK





Discover More
Card Puncher Data Processing
SQL Plus - Command Reference

Commands Description @ @@ / ACCEPT APPEND ARCHIVE ATTRIBUTE BREAK BTITLE CHANGE CLEAR COLUMN COMPUTE CONNECT COPY Copies data from a query to a table in the same or another...
Card Puncher Data Processing
SQL Plus - Script

You must include: a semicolon at the end of each SQL command and a slash (/) on a new line at the end of each PL/SQL block with the @ or the start command where: The exit error...
Card Puncher Data Processing
SQL Plus - WHENEVER OSERROR

Performs the specified action (exits SQLPlus by default) if an operating system error occurs (such as a file writing error). In iSQLPlus, performs the specified action (stops the current script by default)...



Share this page:
Follow us:
Task Runner