The document discusses the structure of PL/SQL blocks. PL/SQL extends SQL by adding procedural constructs, making it more powerful than SQL. The basic unit in PL/SQL is a block, which consists of an optional declare section to declare variables and constants, a mandatory execution section containing the program logic, and an optional exception section to handle runtime errors. All statements in a PL/SQL block are passed to the Oracle engine together, improving processing speed and reducing network traffic compared to individual SQL statements.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
29 views2 pages
Experiment - 3: Variables
The document discusses the structure of PL/SQL blocks. PL/SQL extends SQL by adding procedural constructs, making it more powerful than SQL. The basic unit in PL/SQL is a block, which consists of an optional declare section to declare variables and constants, a mandatory execution section containing the program logic, and an optional exception section to handle runtime errors. All statements in a PL/SQL block are passed to the Oracle engine together, improving processing speed and reducing network traffic compared to individual SQL statements.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
EXPERIMENT – 3
AIM: Introduction and implementation of program using block structure and
variables. PL/SQL is a block structured language that enables developers to combine the power of SQL with procedural statements. All the statements of a block are passed to oracle engine all at once which increases processing speed and decreases the traffic.
Structure of PL/SQL Block:
PL/SQL extends SQL by adding constructs found in procedural languages, resulting in a structural language that is more powerful than SQL. The basic unit in PL/SQL is a block. All PL/SQL programs are made up of blocks, which can be nested within each other.
Typically, each block performs a logical action in the program.
Declare section starts with DECLARE keyword in which variables, constants, records as cursors can be declared which stores data temporarily. It basically consists definition of PL/SQL identifiers. This part of the code is optional. Execution section starts with BEGIN and ends with END keyword. This is a mandatory section and here the program logic is written to perform any task like loops and conditional statements. It supports all DML commands, DDL commands and SQL*PLUS built-in functions as well. Exception section starts with EXCEPTION keyword. This section is optional which contains statements that are executed when a run-time error occurs. Any exceptions can be handled in this section.