Experiment No : 7
Objective:- PL/SQL Programming I :Programs using named and unnamed
blocks, Programs using Cursors, Cursor loops and records.
PL/SQL Programming Overview
PL/SQL (Procedural Language/Structured Query Language) is Oracle's
procedural extension to SQL. It allows embedding procedural constructs like
loops, conditions, and exceptions in SQL.
1. Named and Unnamed Blocks
Unnamed Block: A basic block of PL/SQL without a name. It is executed directly
in the environment.
Named Block: A block with a name, declared as a stored procedure or function,
which can be reused.
2. Programs Using Cursors
A cursor is a pointer to a query result. It allows processing each row in the
result set individually.
3. Cursor Loops and Records
PL/SQL allows simplifying cursor processing using cursor loops. Records can
store entire rows of data retrieved by a cursor.
Experiment No : 8
Objective:- PL/SQL Programming II :Creating stored procedures
,functions ,Trigger
1. Creating Stored Procedures
A Stored Procedure is a named PL/SQL block that performs one or more tasks
and can be executed repeatedly.
2. Creating Functions
A Function is a named PL/SQL block that returns a value. It is used to perform
calculations or return results.
3. Creating Triggers
A Trigger is a special type of stored program that automatically executes when a
specific event occurs in the database (e.g., INSERT, UPDATE, DELETE).