Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 18

Chapter

001-Course Setup

002-Overview of PL/SQL

003-Declaring PLSQL Variables


004-Writing executable statements

005-Interacting with Oracle DB Server

006-Writing Control structure


007-Working with Composite Data Types

008-Using explicit cursors

009-Handling Exceptions
010-Creating Procedure

011- Creating Functions

012- Creating Packages


013-Working with Packages

014-Using oracle-supplied Packages in Application Development

015-Using Dynamic SQL


016-Design consideration for PLSQL Code
017-Creating triggers
018-Creating Compound, DDL, and Event Database Triggers

019-Using the PLSQL Compiler

020-Managing PLSQL Code


021-Managing Dependencies
Lesson name
Course Agenda
Course Setup Notes / 4 Options
Option 2- creating the HR Schema
Option 3- Part 1 : Oracle Database 12c Architecture
Option 3- Part 2 : Downloading Oracle DB 12c
Option 3- Part 3 : Installing Oracle DB 12c
Option 3- Part 4 : Connecting SYS using SQL plus & SQL Developer
Option 3- Part 5: Unlock HR Account Part 1
Option 3- Part 6 : Unlock HR Account Part 2
Option 3- Part 7 : ORA-01033 oracle initialization or shutdown in progress 12c
Option 4- Installing Oracle 11g express Edition + Unlock HR
HR Schema in this Course
Navigate HR schema
What is PL/SQL? What is the benefits?
PL/SQL Block Structure & Types of Blocks
Writing simple anonyms block
Using SQL*plus to run anonyms block
Creating Script and run it
Quiz
About Variables and the syntax
Defining Variables exercise
Guidelines for declaring & initializing variables
Delimiters in string literals (the q' Notation)
Types of variables and data types 1
Types of variables and data types 2
Data Types exercise
Define Variables Using %TYPE
Understating the SELECT statement in PL/SQL
Bind Variables
Quiz
Inside PL/SQL Block
Inside PL/SQL Block (exercise)
Nested Blocks
SQL & PL/SQL programing Guidelines
Quiz
SELECT statement & DML in PL/SQL
SELECT statement & DML in PL/SQL exercise
Understanding Implicit SQL cursor/ SQL Attributes
Implicit SQL cursor exercise
Quiz
IF Statement Part 1
IF Statement Part 2
Handling nulls in IF statement
CASE expression & CASE Statement
Basic Loop
While Loop
FOR Loop
Nested Loops
Nested Loops and Labels
Continue Statement
Quiz
PL/SQL Records: Programmer method part 1
PL/SQL Records: Programmer method part 2
PL/SQL Records: %ROWTYPE method
Nested PL/SQL Records
INDEX BY tables (Associative arrays)
INDEX BY tables Methods
INDEX BY tables of Records
nested table
Varray
Quiz
Understanding Explicit Cursor
Explicit Cursor exercise
Explicit Cursor Attributes
FOR LOOP Cursor
Cursor with Parameters
FOR UPDATE Clause & CURRENT OF Clause
Quiz
Understanding Exceptions
Predefined Oracle Server Error Exception
Common mistakes when dealing with exceptions
Non-Predefined Oracle Server Error Exception
User-Defined Error Exception
Group Functions and exceptions
Many blocks and many exceptions
Quiz
Understanding Procedures and subprograms
Understanding Procedures Syntax
Creating Procedure (IN parameter)
Creating Procedure (OUT parameter)
Creating Procedure (IN OUT parameter)
Comparing the Paramter Modes
Available notations for passing parameters
Using the default option for Parameters
Exception handling in multiple blocks
Using Boolean and PL/SQL records as parameters
Quiz
Understanding user-defined functions
Difference between procedures & functions
Creating function example
No_data_found and functions
Advantages of user-defined functions in SQL Statements
Restrictions when calling functions from SQL part 1
Restrictions when calling functions from SQL part 2
Quiz
Understanding packages by nice example
More about packages
Creating package practice
Creating package specification without body
Guidelines for writing packages
The visibility of a package’s components
When & Why to recompile the package?
Quiz
Understanding Overloading Subprograms in PL/SQL
Overloading Subprograms practices (procedures)
Overloading Subprograms practices (functions)
Overloading Standard package
Forward Declaration
Persistent State of packages
Using PRAGMA SERIALLY_REUSABLE
Persistent State and cursor
using pl/sql tables in packages
Quiz
About oracle-supplied Packages
DBMS_OUTPUT part 1
DBMS_OUTPUT part 2
UTL_FILE Package Part 1 / create directory
UTL_FILE Package Part 2 / get_line example 1
UTL_FILE Package Part 3 / get_line example 2
UTL_FILE Package Part 4 / put_line
UTL_FILE Package Part 5 / exceptions
mail
Quiz
Execution flow of SQL
what is Dynamic SQL?
Execute immediate example 1 / delete any table
Execute immediate example 2 / DDL in PLSQL
Execute immediate example 3 / USING Clause
Execute immediate example 4 / INTO Clause
Execute immediate example 5 / single row query
What is REF Cursor ?
Dynamic SQL with multi row query
Execute immediate/ more examples
DBMS_SQL Package VS Execute immediat
Quiz
Standardizing Part 1
Standardizing Part 2
Definer’s Rights
Invoker’s Rights
Autonomous Transactions
Features Autonomous Transactions
The (IN) parameters always passed by reference
The (out/in out) parameters can be passed by value or reference
Passing by reference example (IN parameters)
Passing by value VS passing by reference using nocopy
When Does NOCOPY hint has no effects?
NOCOPY Performance Exercise
Using the PARALLEL_ENABLE hint
Using the RESULT_CACHE hint
Using the DETERMINISTIC hint
Understanding Bulk Binding
Bulk Binding Example
Bulk binding with save exception part 1
Bulk binding with save exception part 2
Understanding Bulk collect
Bulk collect another example
Bulk collect and cursors
using returning in bulk collect
INDICES OF
Quiz
Understanding Triggers
Tigger Types/ Trigger Event Types
Statement Level trigger VS Row Level (Part 1)
Statement Level trigger VS Row Level (Part 2)
Triggers common cases
Statement Level trigger Example 1
Statement Level trigger Example 2
Understanding the NEW & OLD qualifiers
Row level trigger example
Row level trigger (create Audit table)
Trigger Firing sequence
Compile/enable/ disable/ drop trigger
Using the triggers for populating a default value
Instead of triggers ( on Views)
Quiz
Follows Statement in triggers
Understanding Compound triggers
Understanding Mutating Table
Solving Mutating Table issue using compound trigger
Using Compound trigger & array to solve Mutating
Mutating table & ON DELETE CASCADE
Database Triggers VS Stored procedures
Creating DDL triggers ( Schema or Database )
Create system event trigger
Final comments about the triggers
Quiz
Introduction about PL/SQL compiler
Understanding ( Plsql_code_type ) parameter
Understanding ( plsql_optimize_level ) parameter
Understanding Warnings in PL/SQL
Understanding (plsql_warnings) parameter
More examples for plsql_warnings
using the package dbms_warning
Quiz
Understanding conditional compilation
Understanding (dbms_db_version ) package
conditional compilation examples
Understanding plsql_ccflags part 1
Understanding plsql_ccflags part 2
Understanding plsql_ccflags part 3
plsql_ccflags Real example
dbms_ddl.create_wrapped
The PL/SQL wrapper utility

You might also like