What Is Block Statements In PL/SQL ?



What Is Block Statements In PL/SQL ?

 PL/SQL contains Three sections

The Declaration Section (optional)
The Execution Section (mandatory)
The Exception Handling Section (optional)

The Declaration Section (optional) :

The Declaration Section is started with reserved keyword  DECLARE,and is optional section.This section is used for any placeholders like Variables, records, constants, cursors, which are used to manipulate data in the Execution section.

The Execution Section (mandatory) :

The Execution Section is started with reserved keyword BEGIN and ends with END,and is mandatory section.This is a section where all the program logic is written to perform the task.

The Exception Handling Section (optional) :

The Exception Handling Section is also start with a reserved keyword EXCEPTION,and is an optional section.This section is used for any errors in the program.

Note: Every statement will be ended with semicolon ; .

Unknown

No comments:

Post a Comment

Instagram