Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
4Activity
0 of .
Results for:
No results containing your search query
P. 1
PL SQL Reference

PL SQL Reference

Ratings:

4.0

(2)
|Views: 119|Likes:
Published by api-3716519

More info:

Published by: api-3716519 on Oct 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

PL/SQL
User's Guide and Reference
10g Release 1 (10.1)
Part No. B10807-01
December 2003
PL/SQL User's Guide and Reference, 10g Release 1 (10.1)
Part No. B10807-01
Copyright \u00a9 1996, 2003 Oracle. All rights reserved.
Primary Author: John Russell

Contributors: Shashaanka Agrawal, Cailein Barclay, Dmitri Bronnikov, Sharon Castledine, Thomas
Chang, Ravindra Dani, ChandrasekharanIyer, Susan Kotsovolos, Neil Le, WarrenLi, BrynLlewellyn, Chris
Racicot, Murali Vemulapati, Guhan Viswanathan, Minghui Yang

ThePrograms (which include both the software and documentation) contain proprietary information; they
are provided under a license agreement containing restrictions on use and disclosure and are also protected
bycopyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly,
or decompilation of thePrograms, except to the extent required to obtain interoperability with other
independentlycreated software or as speci\ufb01edby law, is prohibited.

The information contained in this document is subject to change without notice. If you \ufb01nd any problems in
the documentation, please report themto us in writing. This document is not warranted to be error-free.
Except as maybe expressly permitted in your license agreement for thesePrograms, no part of these
Programs maybe reproduced or transmitted in anyform or byany means, electronic or mechanical, for any
purpose.

If thePrograms are delivered to theUnitedStates Government or anyone licensing or using thePrograms on
behalf of theUnitedStates Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data
delivered to U.S. Government customers are "commercial computer software" or "commercial technical
data" pursuant to the applicableFederal Acquisition Regulation and agency-speci\ufb01c supplemental
regulations. As such, use, duplication, disclosure, modi\ufb01cation, and adaptation of thePrograms, including
documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable
Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19,
Commercial Computer Software--Restricted Rights (June 1987). Oracle Corporation, 500 OracleParkway,
RedwoodCity, CA 94065

ThePrograms are not intendedfor use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancyand other measures to ensure the safe use of such applications if thePrograms are usedfor such
purposes, and we disclaimliabilityfor anydamages causedby such use of thePrograms.

Oracle is a registered trademark of Oracle Corporation and/or its af\ufb01liates. Other names maybe trademarks
of their respective owners.

ThePrograms may provide links to Web sites and access to content, products, and services fromthird
parties. Oracle is not responsible for the availability of, or anycontent provided on, third-party Web sites.
You bear all risks associated with the use of suchcontent. If you choose to purchase any products or services
from a thirdparty, the relationship is directlybetween you and the thirdparty. Oracle is not responsible for:
(a) the quality of third-party products or services; or (b) ful\ufb01lling any of the terms of the agreement with the
thirdparty, includingdelivery of products or services and warranty obligations related to purchased
products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from
dealingwith any thirdparty.

iii
Contents
Send Us Your Comments......................................................................................................................xv
Preface..............................................................................................................................................................xvii

Audience....................................................................................................................................................xvii How This Book Is Organized..................................................................................................................xvii Related Documentation...........................................................................................................................xix Conventions...............................................................................................................................................xx SampleDatabaseTables..........................................................................................................................xxi Documentation Accessibility..................................................................................................................xxii Reading theSyntaxDiagrams................................................................................................................xxii

What's New in PL/SQL?.........................................................................................................................xxiii
New Features inPL/SQLfor OracleDatabase 10g...........................................................................xxiii
New Features inPL/SQLfor Oracle9i................................................................................................xxvi
1 Overview of PL/SQL
Advantages of PL/SQL............................................................................................................................1-1

Tight Integration withSQL..............................................................................................................1-1 Support for SQL..................................................................................................................................1-2 Better Performance.............................................................................................................................1-2 Higher Productivity...........................................................................................................................1-3 Full Portability....................................................................................................................................1-3 Tight Security......................................................................................................................................1-3 Support for Object-OrientedProgramming...................................................................................1-3

Understanding the Main Features of PL/SQL....................................................................................1-4

Block Structure....................................................................................................................................1-4 Variables andConstants....................................................................................................................1-5 Processing Queries withPL/SQL....................................................................................................1-6 DeclaringPL/SQL Variables............................................................................................................1-6 Control Structures..............................................................................................................................1-7 Writing ReusablePL/SQL Code......................................................................................................1-9 Data Abstraction..............................................................................................................................1-10 Error Handling................................................................................................................................1-12

PL/SQL Architecture.............................................................................................................................1-12
In theOracleDatabaseServer.......................................................................................................1-13

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->