04 - PL_SQL
04 - PL_SQL
Desktop
Week 4 - PL/SQL
Outline
● Introduction
● Procedure
● Function
● Trigger
What is PL/SQL?
Stands for Procedural Language/Structured Query
Language, is Oracle's procedural extension to SQL
(Structured Query Language). It is used for managing and
manipulating data within Oracle databases
Advantages of PL/SQL
● Performance Optimization
● Integration with Oracle Tools
● Automated Tasks
● Higher Productivity
PL/SQL Block Structure
● Declaration
Where variables, constants, and cursors are declared. The declarative section starts with the
keyword DECLARE and ends at the time of the section executable is started.
● Execution
Where the SQL statements and procedural logic are executed. The execution section start
with keyword BEGIN and ends with keyword END.
● Exception Handling
Where errors and exceptions are managed. The exception handling section start with
keyword EXCEPTION. The exception handling section specifies the action to be performed
when errors and abnormal conditions occur in the execution section
Procedure
Key Features: