Oracle SQL,PL/SQL

What is PL/SQL Block

Written by shohal

PL/SQL Block

Program written in PL/SQL language as divided into blocks.Block are basic programming units in PL/SQL language.PL/SQL contain set of instruction for oracle to execute.

Types of PL/SQL Blocks:

  1. Anonymous Block
  2. Named Block

Anonymous Block: As title of anonymous block do not have any name and they cannot be store in database.

Named Block : Named PL/SQL block that one have a name and creating subroutine such as procedure, function and package .

PL/SQL Block Structure :

Declare -Optional

— variable , cursors,user-define exceptions

Being -Mandatory

–SQL Statement

–PL/SQL Statement

Exception -Optional

–Actions to perform when errors occur

End-Mandatory

About the author

shohal

Leave a Comment