Chapter 4
PL/SQL Programming
Prepared by: Prof. P. B. Khairnar
,Contents
4.1 Introduction to PL/SQL, Advantages of PL/SQL,
4.1 The PL/SQL Block structure, execution environment,
4.1 PL/SQL data types, Variables, Constants.
4.2 Control Structure: Conditional Control,
4.2 Iterative Control, Sequential Control.
4.3 Exception handling: Predefined, User defined exception.
4.4 Cursors: Implicit and Explicit Cursors, Declaring, Opening and Closing a cursor,
4.4 Fetching a record from cursor, Cursor for loops, Parameterized Cursors.
4.5 Procedures: Advantages, Creating, Executing and deleting a Stored Procedure.
4.6 Functions: Advantages, Creating,
4.6 Executing and Deleting Function.
4.7 Database Triggers: Use
4.7 Apply database Triggers, Types of Triggers
4.7 Creating and Deleting Trigger.
Prepared by: Prof. P. B. Khairnar
,PL/SQL
• Stands for Procedural Language/ structured query language.
• It combines flexibility of SQL statements with it.
• PL/SQL provides certain data types, control structures, procedures
functions, exceptions, triggers.
Prepared by: Prof. P. B. Khairnar
, Advantages of PL/SQL
• PL/SQL is a portable and high transaction processing language.
• Portable means it runs on any operating system where oracle server run
• PL/SQL is a fact procedural language.
• It also supports object oriented programming.
• It has got built in library of packages.
• It is highly productive language.
• The performance is better than a single line query, as here entire block o
statements can be processed.
• Capable of handling different data types.
• PL/SQL is user friendly and very simple language.
• It has most important features like triggers, cursors, locks etc.
• Security is ensured with PL/SQL. Prepared by: Prof. P. B. Khairnar
PL/SQL Programming
Prepared by: Prof. P. B. Khairnar
,Contents
4.1 Introduction to PL/SQL, Advantages of PL/SQL,
4.1 The PL/SQL Block structure, execution environment,
4.1 PL/SQL data types, Variables, Constants.
4.2 Control Structure: Conditional Control,
4.2 Iterative Control, Sequential Control.
4.3 Exception handling: Predefined, User defined exception.
4.4 Cursors: Implicit and Explicit Cursors, Declaring, Opening and Closing a cursor,
4.4 Fetching a record from cursor, Cursor for loops, Parameterized Cursors.
4.5 Procedures: Advantages, Creating, Executing and deleting a Stored Procedure.
4.6 Functions: Advantages, Creating,
4.6 Executing and Deleting Function.
4.7 Database Triggers: Use
4.7 Apply database Triggers, Types of Triggers
4.7 Creating and Deleting Trigger.
Prepared by: Prof. P. B. Khairnar
,PL/SQL
• Stands for Procedural Language/ structured query language.
• It combines flexibility of SQL statements with it.
• PL/SQL provides certain data types, control structures, procedures
functions, exceptions, triggers.
Prepared by: Prof. P. B. Khairnar
, Advantages of PL/SQL
• PL/SQL is a portable and high transaction processing language.
• Portable means it runs on any operating system where oracle server run
• PL/SQL is a fact procedural language.
• It also supports object oriented programming.
• It has got built in library of packages.
• It is highly productive language.
• The performance is better than a single line query, as here entire block o
statements can be processed.
• Capable of handling different data types.
• PL/SQL is user friendly and very simple language.
• It has most important features like triggers, cursors, locks etc.
• Security is ensured with PL/SQL. Prepared by: Prof. P. B. Khairnar