PL/SQL User's Guide and Reference
Library
Product
PL/SQL
(tm)
User's Guide and Reference
Preface
Audience
What's New in This Edition?
How This Guide Is Organized
Notational Conventions
Sample Database Tables
Your Comments Are Welcome
User's Guide
Overview
Main Features
Architecture
Advantages of PL/SQL
Fundamentals
Character Set
Lexical Units
Datatypes
User-Defined Subtypes
Datatype Conversion
Declarations
Naming Conventions
Scope and Visibility
Assignments
Expressions and Comparisons
Built-In Functions
Control Structures
Overview
Conditional Control: IF Statements
Iterative Control: LOOP and EXIT Statements
Sequential Control: GOTO and NULL Statements
PL/SQL Tables and User-Defined Records
PL/SQL Tables
User-Defined Records
Interaction with Oracle
SQL Support
Using DDL and Dynamic SQL
Managing Cursors
Packaging Cursors
Using Cursor FOR Loops
Using Cursor Variables
Using Cursor Attributes
Processing Transactions
Error Handling
Overview
Advantages and Disadvantages of Exceptions
Predefined Exceptions
User-Defined Exceptions
How Exceptions Are Raised
How Exceptions Propagate
Reraising an Exception
Handling Raised Exceptions
Useful Techniques
Subprograms
What Are Subprograms?
Advantages of Subprograms
Procedures
Functions
RETURN Statement
Declaring Subprograms
Actual versus Formal Parameters
Positional and Named Notation
Parameter Modes
Parameter Default Values
Parameter Aliasing
Overloading
Recursion
Packages
What Is a Package?
Advantages of Packages
The Package Specification
The Package Body
Some Examples
Private versus Public Objects
Overloading
Package STANDARD
Product-specific Packages
Guidelines
Execution Environments
SQL*Plus Environment
Oracle Precompiler Environment
OCI Environment
Language Reference
Language Elements
Reading Syntax Definitions
Assignment Statement
Blocks
CLOSE Statement
Comments
COMMIT Statement
Constants and Variables
Cursor Attributes
Cursors
Cursor Variables
DELETE Statement
EXCEPTION_INIT Pragma
Exceptions
EXIT Statement
Expressions
FETCH Statement
Functions
GOTO Statement
IF Statement
INSERT Statement
Literals
LOCK TABLE Statement
LOOP Statements
NULL Statement
OPEN Statement
OPEN-FOR Statement
Packages
PL/SQL Table Attributes
PL/SQL Tables
Procedures
RAISE Statement
Records
RETURN Statement
ROLLBACK Statement
%ROWTYPE Attribute
SAVEPOINT Statement
SELECT INTO Statement
SET TRANSACTION Statement
SQL Cursor
SQLCODE Function
SQLERRM Function
%TYPE Attribute
UPDATE Statement
Appendices
New Features
Support for File I/O
PL/SQL Table Improvements
Cursor Variable Improvements
New Fast-Integer Datatype
Full Support for Subqueries
New Remote Dependency Mode
Sample Programs
Running the Samples
Sample 1. FOR Loop
Sample 2. Cursors
Sample 3. Scoping
Sample 4. Batch Transaction Processing
Sample 5. Embedded PL/SQL
Sample 6. Calling a Stored Procedure
CHAR versus VARCHAR2 Semantics
Assigning Character Values
Comparing Character Values
Inserting Character Values
Selecting Character Values
Guidelines
PL/SQL Wrapper
Advantages of Wrapping
Running the PL/SQL Wrapper
Reserved Words
PL/SQL Reserved Words
Copyright © 1996 Oracle Corporation
500 Oracle Parkway, Redwood City, CA 94065
Library
Product