Table of Contents
- List of Examples
- List of Figures
- List of Tables
- Title and Copyright Information
- Preface
-
1
Changes in This Release for Oracle Database PL/SQL Language Reference
- New Features in Release 23ai for Oracle Database PL/SQL Language Reference
- Deprecated Features
- Desupported Features
-
2
Overview of PL/SQL
- Advantages of PL/SQL
- Main Features of PL/SQL
- Architecture of PL/SQL
- Protecting Sensitive Information in PL/SQL
-
3
PL/SQL Language Fundamentals
- Character Sets
- Lexical Units
- Declarations
- References to Identifiers
- Scope and Visibility of Identifiers
- Assigning Values to Variables
- Expressions
- Error-Reporting Functions
- Conditional Compilation
-
4
PL/SQL Data Types
- SQL Data Types
- PLS_INTEGER and BINARY_INTEGER Data Types
- User-Defined PL/SQL Subtypes
- 5 PL/SQL Control Statements
-
6
PL/SQL Collections and Records
- Collection Types
- Associative Arrays
- Varrays (Variable-Size Arrays)
- Nested Tables
- Collection Constructors
- Qualified Expressions Overview
- Assigning Values to Collection Variables
- Multidimensional Collections
- Collection Comparisons
- Collection Methods
- Collection Types Defined in Package Specifications
- Record Variables
- Assigning Values to Record Variables
- Record Comparisons
- Inserting Records into Tables
- Updating Rows with Records
- Restrictions on Record Inserts and Updates
-
7
PL/SQL Static SQL
- Description of Static SQL
- Cursors Overview
- Processing Query Result Sets
- Cursor Variables
- CURSOR Expressions
- Transaction Processing and Control
- Autonomous Transactions
- 8 PL/SQL Dynamic SQL
-
9
PL/SQL Subprograms
- Reasons to Use Subprograms
- Nested, Package, and Standalone Subprograms
- Subprogram Invocations
- Subprogram Properties
- Subprogram Parts
- Forward Declaration
- Subprogram Parameters
- Subprogram Invocation Resolution
- Overloaded Subprograms
- Recursive Subprograms
- Subprogram Side Effects
-
PL/SQL Function Result Cache
- Enabling Result-Caching for a Function
- Developing Applications with Result-Cached Functions
- Requirements for Result-Cached Functions
- Examples of Result-Cached Functions
-
Advanced Result-Cached Function Topics
- Rules for a Cache Hit
- Result Cache Bypass
- Making Result-Cached Functions Handle Session-Specific Settings
- Making Result-Cached Functions Handle Session-Specific Application Contexts
- Choosing Result-Caching Granularity
- Result Caches in Oracle RAC Environment
- Result Cache Management
- Hot-Patching PL/SQL Units on Which Result-Cached Functions Depend
- PL/SQL Functions that SQL Statements Can Invoke
- Invoker's Rights and Definer's Rights (AUTHID Property)
- External Subprograms
-
10
PL/SQL Triggers
- Overview of Triggers
- Reasons to Use Triggers
-
DML Triggers
- Conditional Predicates for Detecting Triggering DML Statement
- INSTEAD OF DML Triggers
- Compound DML Triggers
-
Triggers for Ensuring Referential Integrity
- Foreign Key Trigger for Child Table
- UPDATE and DELETE RESTRICT Trigger for Parent Table
- UPDATE and DELETE SET NULL Trigger for Parent Table
- DELETE CASCADE Trigger for Parent Table
- UPDATE CASCADE Trigger for Parent Table
- Triggers for Complex Constraint Checking
- Triggers for Complex Security Authorizations
- Triggers for Transparent Event Logging
- Triggers for Deriving Column Values
- Triggers for Building Complex Updatable Views
- Triggers for Fine-Grained Access Control
- Correlation Names and Pseudorecords
- System Triggers
- Subprograms Invoked by Triggers
- Trigger Compilation, Invalidation, and Recompilation
- Exception Handling in Triggers
- Trigger Design Guidelines
- Trigger Restrictions
- Order in Which Triggers Fire
- Trigger Enabling and Disabling
- Trigger Changing and Debugging
- Triggers and Oracle Database Data Transfer Utilities
- Triggers for Publishing Events
- Views for Information About Triggers
- 11 PL/SQL Packages
-
12
PL/SQL Error Handling
- Compile-Time Warnings
- Overview of Exception Handling
- Internally Defined Exceptions
- Predefined Exceptions
- User-Defined Exceptions
- Redeclared Predefined Exceptions
- Raising Exceptions Explicitly
- Exception Propagation
- Unhandled Exceptions
- Retrieving Error Code and Error Message
- Continuing Execution After Handling Exceptions
- Retrying Transactions After Handling Exceptions
- Handling Errors in Distributed Queries
-
13
PL/SQL Optimization and Tuning
- PL/SQL Optimizer
- Candidates for Tuning
- Minimizing CPU Overhead
- Bulk SQL and Bulk Binding
-
Chaining Pipelined Table Functions for Multiple Transformations
- Overview of Table Functions
- Creating Pipelined Table Functions
- Pipelined Table Functions as Transformation Functions
- Chaining Pipelined Table Functions
- Fetching from Results of Pipelined Table Functions
- Passing CURSOR Expressions to Pipelined Table Functions
- DML Statements on Pipelined Table Function Results
- NO_DATA_NEEDED Exception
-
Overview of Polymorphic Table Functions
- Polymorphic Table Function Definition
- Polymorphic Table Function Implementation
- Polymorphic Table Function Invocation
- Polymorphic Table Function Compilation and Execution
- Polymorphic Table Function Optimization
- Skip_col Polymorphic Table Function Example
- To_doc Polymorphic Table Function Example
- Implicit_echo Polymorphic Table Function Example
- Updating Large Tables in Parallel
- Collecting Data About User-Defined Identifiers
- Profiling and Tracing PL/SQL Programs
- Compiling PL/SQL Units for Native Execution
-
14
PL/SQL Language Elements
- ACCESSIBLE BY Clause
- AGGREGATE Clause
- Assignment Statement
- AUTONOMOUS_TRANSACTION Pragma
- Basic LOOP Statement
- Block
- Call Specification
- CASE Statement
- CLOSE Statement
- Collection Method Invocation
- Collection Variable Declaration
- Comment
- COMPILE Clause
- Constant Declaration
- CONTINUE Statement
- COVERAGE Pragma
- Cursor FOR LOOP Statement
- Cursor Variable Declaration
- Datatype Attribute
- DEFAULT COLLATION Clause
- DELETE Statement Extension
- DEPRECATE Pragma
- DETERMINISTIC Clause
- Element Specification
- EXCEPTION_INIT Pragma
- Exception Declaration
- Exception Handler
- EXECUTE IMMEDIATE Statement
- EXIT Statement
- Explicit Cursor Declaration and Definition
- Expression
- FETCH Statement
- FOR LOOP Statement
- FORALL Statement
- Formal Parameter Declaration
- Function Declaration and Definition
- GOTO Statement
- IF Statement
- Implicit Cursor Attribute
- INLINE Pragma
- Invoker’s Rights and Definer’s Rights Clause
- INSERT Statement Extension
- Iterator
- Named Cursor Attribute
- NULL Statement
- OPEN Statement
- OPEN FOR Statement
- PARALLEL_ENABLE Clause
- PIPE ROW Statement
- PIPELINED Clause
- Procedure Declaration and Definition
- Qualified Expression
- RAISE Statement
- Record Variable Declaration
- RESTRICT_REFERENCES Pragma
- RETURN Statement
- RETURNING INTO Clause
- RESULT_CACHE Clause
- %ROWTYPE Attribute
- Scalar Variable Declaration
- SELECT INTO Statement
- SERIALLY_REUSABLE Pragma
- SHARD_ENABLE Clause
- SHARING Clause
- SQL_MACRO Clause
- SQLCODE Function
- SQLERRM Function
- SUPPRESSES_WARNING_6009 Pragma
- %TYPE Attribute
- UDF Pragma
- UPDATE Statement Extensions
- WHILE LOOP Statement
-
15
SQL Statements for Stored PL/SQL Units
- ALTER FUNCTION Statement
- ALTER LIBRARY Statement
- ALTER PACKAGE Statement
- ALTER PROCEDURE Statement
- ALTER TRIGGER Statement
- ALTER TYPE Statement
- CREATE FUNCTION Statement
- CREATE LIBRARY Statement
- CREATE PACKAGE Statement
- CREATE PACKAGE BODY Statement
- CREATE PROCEDURE Statement
- CREATE TRIGGER Statement
- CREATE TYPE Statement
- CREATE TYPE BODY Statement
- DROP FUNCTION Statement
- DROP LIBRARY Statement
- DROP PACKAGE Statement
- DROP PROCEDURE Statement
- DROP TRIGGER Statement
- DROP TYPE Statement
- DROP TYPE BODY Statement
- A PL/SQL Source Text Wrapping
- B PL/SQL Name Resolution
- C PL/SQL Program Limits
- D PL/SQL Reserved Words and Keywords
- E PL/SQL Predefined Data Types
- Index