fastread homefastrread library fastread menu

Oracle/PLSQL : Exit Statement

Tutorial by:      Date: 2016-04-15 05:06:30

❰ Previous Next ❱

This Oracle tutorial explains how to use the EXIT statement in Oracle with syntax and examples.

Description

In Oracle, the EXIT statement is most commonly used to terminate LOOP statements.

Syntax

The syntax for the EXIT statement in Oracle/PLSQL is:

EXIT [WHEN boolean_condition];

Parameters or Arguments

boolean_condition
Optional. It is the condition to terminate the LOOP.

Example

Let's look at an EXIT Example in Oracle/PLSQL:

LOOP
   monthly_value := daily_value * 31;
   EXIT WHEN monthly_value > 4000;
END LOOP;

In this example, the LOOP would terminate when the monthly_value exceeded 4000.

❰ Previous Next ❱


Oracle/PLSQL

Submit Your Thought, Tutorial, Articls etc.

Submit Your Information India's Number one online promotion website