PL/SQL Exception

PL/SQL Exception

PL/SQL Interview Questions

PL/SQL Interview Questions and Answers


PL/SQL Case Statement

The PL/SQL CASE statement is helps you to execute a sequence of statement based on a selector. A CASE statement is start execution from top to bottom. Unlike the PL/SQL IF statement, PL/SQL CASE statement uses a selector instead of multiple IF statement to evaluate boolean value.

In PL/SQL you can use data type such as expression, variable and function that the CASE statement evaluates to a Boolean value but can not use BLOB, BFILE and composite types.

PL/SQL Case Statement Syntax

To execute a sequence of statement based on a selector, use the following syntax:

Syntax

PL/SQL Case Statement example

The following PL/SQL uses CASE statement to execute a sequence of statements based on a selector:

Example