Tuesday, 22 May 2012

What is the basic structure of a Procedural Language/Structured Query Language (PL/SQL) block? | PL SQL

  The basic structure of a PL/SQL block contains the following three sections:
a.    Declaration — Defines and initializes the variables and cursors of the block
b.    Execution — Manipulates the variables and cursors defined in the declaration section using the control flow statements
c.    Exception  — Handles the exceptions raised during the program
A typical PL/SQL block structure is given as follows:
Declare
<variable>
<CONSTANTS>
<CURSORS>
begin
<control statements>
exception
<exception handling statements>
end;

No comments: