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;
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:
Post a Comment