- Page 1 and 2: PL/SQL User’s Guide and Reference
- Page 3 and 4: Contents Send Us Your Comments ....
- Page 5 and 6: Character Types ...................
- Page 7 and 8: Retrieving Query Results into Colle
- Page 9 and 10: Calling Autonomous Functions from S
- Page 11 and 12: Parallelizing Table Functions......
- Page 13 and 14: Inserting Objects .................
- Page 15 and 16: Literals...........................
- Page 17 and 18: D PL/SQL Name Resolution What Is Na
- Page 19: Send Us Your Comments PL/SQL User
- Page 23 and 24: Chapter 6, "Interaction Between PL/
- Page 25 and 26: http://oraclestore.oracle.com/ Cust
- Page 27 and 28: The following table describes typog
- Page 29 and 30: 40 OPERATIONS BOSTON EMPNO ENAME JO
- Page 31 and 32: What’s New in PL/SQL This section
- Page 33 and 34: You can dynamically choose the leve
- Page 35 and 36: setting is saved so that the proced
- Page 37 and 38: 1 Overview of PL/SQL The limits of
- Page 39 and 40: Understanding the Main Features of
- Page 41 and 42: Understanding the Main Features of
- Page 43 and 44: Understanding the Main Features of
- Page 45 and 46: Understanding the Main Features of
- Page 47 and 48: Understanding the Main Features of
- Page 49 and 50: Understanding the Main Features of
- Page 51 and 52: Understanding the Main Features of
- Page 53 and 54: PL/SQL Architecture You can define
- Page 55 and 56: PL/SQL Architecture Stored subprogr
- Page 57 and 58: Advantages of PL/SQL PL/SQL lets yo
- Page 59 and 60: Advantages of PL/SQL Also, PL/SQL i
- Page 61 and 62: 2 Fundamentals of PL/SQL There are
- Page 63 and 64: Lexical Units Delimiters A delimite
- Page 65 and 66: Lexical Units An identifier consist
- Page 67 and 68: Lexical Units Some PL/SQL reserved
- Page 69 and 70: Lexical Units String Literals A cha
- Page 71 and 72:
Declarations Declarations bonus :=
- Page 73 and 74:
Declarations Using NOT NULL Besides
- Page 75 and 76:
Declarations The column values retu
- Page 77 and 78:
PL/SQL Naming Conventions Restricti
- Page 79 and 80:
Scope and Visibility of PL/SQL Iden
- Page 81 and 82:
Scope and Visibility of PL/SQL Iden
- Page 83 and 84:
PL/SQL Expressions and Comparisons
- Page 85 and 86:
PL/SQL Expressions and Comparisons
- Page 87 and 88:
PL/SQL Expressions and Comparisons
- Page 89 and 90:
PL/SQL Expressions and Comparisons
- Page 91 and 92:
PL/SQL Expressions and Comparisons
- Page 93 and 94:
PL/SQL Expressions and Comparisons
- Page 95 and 96:
Built-In Functions Built-In Functio
- Page 97 and 98:
3 PL/SQL Datatypes Like—but oh ho
- Page 99 and 100:
Predefined Datatypes Number Types N
- Page 101 and 102:
Predefined Datatypes PLS_INTEGER Yo
- Page 103 and 104:
Predefined Datatypes LONG columns c
- Page 105 and 106:
Predefined Datatypes ■ ■ BBBBBB
- Page 107 and 108:
Predefined Datatypes each character
- Page 109 and 110:
Predefined Datatypes Because the ph
- Page 111 and 112:
Predefined Datatypes NCLOB You use
- Page 113 and 114:
Predefined Datatypes You can add an
- Page 115 and 116:
Predefined Datatypes Time (UTC)—f
- Page 117 and 118:
User-Defined Subtypes Operand 1 Ope
- Page 119 and 120:
User-Defined Subtypes SUBTYPE Accum
- Page 121 and 122:
Datatype Conversion finish_time CHA
- Page 123 and 124:
Datatype Conversion date format. To
- Page 125 and 126:
4 PL/SQL Control Structures One shi
- Page 127 and 128:
Conditional Control: IF and CASE St
- Page 129 and 130:
Conditional Control: IF and CASE St
- Page 131 and 132:
Conditional Control: IF and CASE St
- Page 133 and 134:
Iterative Control: LOOP and EXIT St
- Page 135 and 136:
Iterative Control: LOOP and EXIT St
- Page 137 and 138:
Iterative Control: LOOP and EXIT St
- Page 139 and 140:
Iterative Control: LOOP and EXIT St
- Page 141 and 142:
Sequential Control: GOTO and NULL S
- Page 143 and 144:
Sequential Control: GOTO and NULL S
- Page 145 and 146:
Sequential Control: GOTO and NULL S
- Page 147 and 148:
5 PL/SQL Collections and Records Kn
- Page 149 and 150:
What Is a Collection Nested tables
- Page 151 and 152:
What Is a Collection temporary stor
- Page 153 and 154:
Defining Collection Types Each varr
- Page 155 and 156:
Defining Collection Types DECLARE T
- Page 157 and 158:
Declaring PL/SQL Collection Variabl
- Page 159 and 160:
Initializing and Referencing Collec
- Page 161 and 162:
Assigning Collections NULL; END IF;
- Page 163 and 164:
Comparing Collections /* Assume exe
- Page 165 and 166:
Using PL/SQL Collections with SQL S
- Page 167 and 168:
Using PL/SQL Collections with SQL S
- Page 169 and 170:
Using PL/SQL Collections with SQL S
- Page 171 and 172:
Using PL/SQL Collections with SQL S
- Page 173 and 174:
Using Multilevel Collections / Mult
- Page 175 and 176:
Using Collection Methods collection
- Page 177 and 178:
Using Collection Methods i := cours
- Page 179 and 180:
Using Collection Methods When it in
- Page 181 and 182:
Avoiding Collection Exceptions my_p
- Page 183 and 184:
Reducing Loop Overhead for Collecti
- Page 185 and 186:
Reducing Loop Overhead for Collecti
- Page 187 and 188:
Using the FORALL Statement Using th
- Page 189 and 190:
Using the FORALL Statement -- raise
- Page 191 and 192:
Using the FORALL Statement To have
- Page 193 and 194:
Retrieving Query Results into Colle
- Page 195 and 196:
Retrieving Query Results into Colle
- Page 197 and 198:
Defining and Declaring Records DELE
- Page 199 and 200:
Defining and Declaring Records Decl
- Page 201 and 202:
Defining and Declaring Records BEGI
- Page 203 and 204:
Defining and Declaring Records dept
- Page 205 and 206:
Manipulating Records FUNCTION acid_
- Page 207 and 208:
Manipulating Records Inserting PL/S
- Page 209 and 210:
Manipulating Records INSERT INTO te
- Page 211 and 212:
Manipulating Records PL/SQL support
- Page 213 and 214:
6 Interaction Between PL/SQL and Or
- Page 215 and 216:
Overview of SQL Support in PL/SQL Y
- Page 217 and 218:
Overview of SQL Support in PL/SQL Y
- Page 219 and 220:
Managing Cursors [RETURN return_typ
- Page 221 and 222:
Managing Cursors current row and th
- Page 223 and 224:
Managing Cursors Using Subqueries i
- Page 225 and 226:
Using Cursor FOR Loops LOOP FETCH e
- Page 227 and 228:
Using Cursor FOR Loops In such case
- Page 229 and 230:
Using Cursor Variables A query work
- Page 231 and 232:
Using Cursor Variables Cursor Varia
- Page 233 and 234:
Using Cursor Variables END cv_types
- Page 235 and 236:
Using Cursor Variables Fetching fro
- Page 237 and 238:
Using Cursor Variables Cursor Varia
- Page 239 and 240:
Using Cursor Variables { int emp_nu
- Page 241 and 242:
Using Cursor Variables Cursor Varia
- Page 243 and 244:
Using Cursor Variables When you pas
- Page 245 and 246:
Using Cursor Variables Be careful w
- Page 247 and 248:
Using Cursor Attributes %FOUND Attr
- Page 249 and 250:
Using Cursor Attributes Table 6-1 N
- Page 251 and 252:
Using Cursor Attributes %FOUND Attr
- Page 253 and 254:
Using Cursor Expressions IF SQL%NOT
- Page 255 and 256:
Overview of Transaction Processing
- Page 257 and 258:
Overview of Transaction Processing
- Page 259 and 260:
Overview of Transaction Processing
- Page 261 and 262:
Overview of Transaction Processing
- Page 263 and 264:
Overview of Transaction Processing
- Page 265 and 266:
Doing Independent Units of Work wit
- Page 267 and 268:
Doing Independent Units of Work wit
- Page 269 and 270:
Doing Independent Units of Work wit
- Page 271 and 272:
Doing Independent Units of Work wit
- Page 273 and 274:
Doing Independent Units of Work wit
- Page 275 and 276:
7 Handling PL/SQL Errors There is n
- Page 277 and 278:
Advantages of PL/SQL Exceptions The
- Page 279 and 280:
Predefined PL/SQL Exceptions Brief
- Page 281 and 282:
Defining Your Own PL/SQL Exceptions
- Page 283 and 284:
Defining Your Own PL/SQL Exceptions
- Page 285 and 286:
How PL/SQL Exceptions Propagate EXC
- Page 287 and 288:
How PL/SQL Exceptions Propagate Fig
- Page 289 and 290:
Handling Raised PL/SQL Exceptions E
- Page 291 and 292:
Handling Raised PL/SQL Exceptions E
- Page 293 and 294:
Handling Raised PL/SQL Exceptions e
- Page 295 and 296:
Tips for Handling PL/SQL Errors Ret
- Page 297 and 298:
8 PL/SQL Subprograms Civilization a
- Page 299 and 300:
Understanding PL/SQL Procedures Adv
- Page 301 and 302:
Understanding PL/SQL Procedures sta
- Page 303 and 304:
Understanding PL/SQL Functions elec
- Page 305 and 306:
Understanding PL/SQL Functions BEGI
- Page 307 and 308:
Packaging PL/SQL Subprograms Togeth
- Page 309 and 310:
Positional Versus Named Notation fo
- Page 311 and 312:
Specifying Subprogram Parameter Mod
- Page 313 and 314:
Passing Large Data Structures with
- Page 315 and 316:
Using Default Values for Subprogram
- Page 317 and 318:
Understanding Subprogram Parameter
- Page 319 and 320:
Overloading Subprogram Names FETCH
- Page 321 and 322:
Overloading Subprogram Names You ca
- Page 323 and 324:
How Subprogram Calls Are Resolved F
- Page 325 and 326:
How Subprogram Calls Are Resolved W
- Page 327 and 328:
Accepting and Returning Multiple Ro
- Page 329 and 330:
Accepting and Returning Multiple Ro
- Page 331 and 332:
Accepting and Returning Multiple Ro
- Page 333 and 334:
Accepting and Returning Multiple Ro
- Page 335 and 336:
Accepting and Returning Multiple Ro
- Page 337 and 338:
Accepting and Returning Multiple Ro
- Page 339 and 340:
Parallelizing Table Functions Handl
- Page 341 and 342:
Parallelizing Table Functions with
- Page 343 and 344:
How Table Functions Stream their In
- Page 345 and 346:
Invoker Rights Versus Definer Right
- Page 347 and 348:
Invoker Rights Versus Definer Right
- Page 349 and 350:
Invoker Rights Versus Definer Right
- Page 351 and 352:
Invoker Rights Versus Definer Right
- Page 353 and 354:
Invoker Rights Versus Definer Right
- Page 355 and 356:
Invoker Rights Versus Definer Right
- Page 357 and 358:
Understanding and Using Recursion U
- Page 359 and 360:
Understanding and Using Recursion U
- Page 361 and 362:
Calling External Subprograms Callin
- Page 363 and 364:
9 PL/SQL Packages Goods which are n
- Page 365 and 366:
What Is a PL/SQL Package [cursor_sp
- Page 367 and 368:
Advantages of PL/SQL Packages Advan
- Page 369 and 370:
Understanding The Package Spec mini
- Page 371 and 372:
Some Examples of Package Features S
- Page 373 and 374:
Some Examples of Package Features F
- Page 375 and 376:
Some Examples of Package Features /
- Page 377 and 378:
How Package STANDARD Defines the PL
- Page 379 and 380:
Overview of Product-Specific Packag
- Page 381 and 382:
10 PL/SQL Object Types ... It next
- Page 383 and 384:
What Is an Object Type What Is an O
- Page 385 and 386:
Structure of an Object Type Why Use
- Page 387 and 388:
Components of an Object Type Compon
- Page 389 and 390:
Components of an Object Type You ca
- Page 391 and 392:
Components of an Object Type An obj
- Page 393 and 394:
Defining Object Types Defining Obje
- Page 395 and 396:
Defining Object Types address VARCH
- Page 397 and 398:
Defining Object Types Finally, you
- Page 399 and 400:
Defining Object Types methods for t
- Page 401 and 402:
Defining Object Types Then, you wri
- Page 403 and 404:
Defining Object Types CREATE FUNCTI
- Page 405 and 406:
Declaring and Initializing Objects
- Page 407 and 408:
Accessing Attributes Accessing Attr
- Page 409 and 410:
Calling Constructors DECLARE r1 rec
- Page 411 and 412:
Sharing Objects through the REF Mod
- Page 413 and 414:
Manipulating Objects Manipulating O
- Page 415 and 416:
Manipulating Objects Using Function
- Page 417 and 418:
Manipulating Objects search criteri
- Page 419 and 420:
Manipulating Objects Inserting Obje
- Page 421 and 422:
11 Native Dynamic SQL A happy and g
- Page 423 and 424:
Using the EXECUTE IMMEDIATE Stateme
- Page 425 and 426:
Using the EXECUTE IMMEDIATE Stateme
- Page 427 and 428:
Using the OPEN-FOR, FETCH, and CLOS
- Page 429 and 430:
Using the OPEN-FOR, FETCH, and CLOS
- Page 431 and 432:
Using Bulk Dynamic SQL Using Bulk D
- Page 433 and 434:
Using Bulk Dynamic SQL BEGIN OPEN e
- Page 435 and 436:
Tips and Traps for Dynamic SQL To d
- Page 437 and 438:
Tips and Traps for Dynamic SQL Doin
- Page 439 and 440:
12 Tuning PL/SQL Applications Every
- Page 441 and 442:
Reasons for PL/SQL Performance Prob
- Page 443 and 444:
Reasons for PL/SQL Performance Prob
- Page 445 and 446:
Reasons for PL/SQL Performance Prob
- Page 447 and 448:
Identifying PL/SQL Performance Prob
- Page 449 and 450:
PL/SQL Features for Performance Tun
- Page 451 and 452:
PL/SQL Features for Performance Tun
- Page 453 and 454:
PL/SQL Features for Performance Tun
- Page 455 and 456:
13 PL/SQL Language Elements Grammar
- Page 457 and 458:
Reading the Syntax Diagrams When yo
- Page 459 and 460:
Assignment Statement collection_nam
- Page 461 and 462:
Assignment Statement As the next ex
- Page 463 and 464:
AUTONOMOUS_TRANSACTION Pragma Once
- Page 465 and 466:
Blocks Blocks The basic program uni
- Page 467 and 468:
Blocks item_declaration collection_
- Page 469 and 470:
Blocks collection_declaration This
- Page 471 and 472:
Blocks DECLARE x INTEGER; BEGIN ...
- Page 473 and 474:
CASE Statement CASE Statement The C
- Page 475 and 476:
CASE Statement CASE WHEN quantity i
- Page 477 and 478:
CLOSE Statement If you try to close
- Page 479 and 480:
Collection Methods Keyword and Para
- Page 481 and 482:
Collection Methods EXTEND operates
- Page 483 and 484:
Collections Collections A collectio
- Page 485 and 486:
Collections element_type cursor_nam
- Page 487 and 488:
Collections Collections can store i
- Page 489 and 490:
Collections In the following exampl
- Page 491 and 492:
COMMIT Statement COMMIT Statement S
- Page 493 and 494:
Constants and Variables Constants a
- Page 495 and 496:
Constants and Variables expression
- Page 497 and 498:
Cursor Attributes Cursor Attributes
- Page 499 and 500:
Cursor Attributes Before the first
- Page 501 and 502:
Cursor Attributes BEGIN OPEN c1; LO
- Page 503 and 504:
Cursor Variables Keyword and Parame
- Page 505 and 506:
Cursor Variables You use three stat
- Page 507 and 508:
Cursor Variables You can also pass
- Page 509 and 510:
Cursors rowtype db_table_name curso
- Page 511 and 512:
Cursors You cannot assign values to
- Page 513 and 514:
DELETE Statement Keyword and Parame
- Page 515 and 516:
DELETE Statement You can combine th
- Page 517 and 518:
EXCEPTION_INIT Pragma Example Relat
- Page 519 and 520:
Exceptions WHEN This keyword introd
- Page 521 and 522:
EXECUTE IMMEDIATE Statement EXECUTE
- Page 523 and 524:
EXECUTE IMMEDIATE Statement At run
- Page 525 and 526:
EXIT Statement EXIT Statement Synta
- Page 527 and 528:
Expressions Expressions An expressi
- Page 529 and 530:
Expressions numeric_subexpression c
- Page 531 and 532:
Expressions boolean_function_call T
- Page 533 and 534:
Expressions %FOUND, %ISOPEN, %NOTFO
- Page 535 and 536:
Expressions relational_operator Thi
- Page 537 and 538:
FETCH Statement FETCH Statement Syn
- Page 539 and 540:
FETCH Statement Any variables in th
- Page 541 and 542:
FETCH Statement In the example belo
- Page 543 and 544:
FORALL Statement sql_statement This
- Page 545 and 546:
FORALL Statement -- fill varray her
- Page 547 and 548:
Functions Syntax function_spec FUNC
- Page 549 and 550:
Functions datatype This is a type s
- Page 551 and 552:
Functions := | DEFAULT This operato
- Page 553 and 554:
GOTO Statement GOTO Statement Synta
- Page 555 and 556:
IF Statement IF Statement The IF st
- Page 557 and 558:
IF Statement Examples In the exampl
- Page 559 and 560:
INSERT Statement returning_clause T
- Page 561 and 562:
Literals Literals A literal is an e
- Page 563 and 564:
Literals Examples Several examples
- Page 565 and 566:
LOCK TABLE Statement If your progra
- Page 567 and 568:
LOOP Statements cursor_for_loop_sta
- Page 569 and 570:
LOOP Statements Inside a loop, its
- Page 571 and 572:
LOOP Statements The loop index is a
- Page 573 and 574:
MERGE Statement MERGE Statement The
- Page 575 and 576:
NULL Statement NULL Statement Synta
- Page 577 and 578:
Object Types , MEMBER CONSTRUCTOR S
- Page 579 and 580:
Object Types object_instance.method
- Page 581 and 582:
Object Types Usage Notes Once an ob
- Page 583 and 584:
Object Types MEMBER FUNCTION full R
- Page 585 and 586:
OPEN Statement OPEN Statement Synta
- Page 587 and 588:
OPEN-FOR Statement OPEN-FOR Stateme
- Page 589 and 590:
OPEN-FOR Statement CREATE PACKAGE B
- Page 591 and 592:
OPEN-FOR-USING Statement with the r
- Page 593 and 594:
Packages Packages A package is a sc
- Page 595 and 596:
Packages call_spec This publishes a
- Page 597 and 598:
Packages record_type_definition Thi
- Page 599 and 600:
Procedures Procedures A procedure i
- Page 601 and 602:
Procedures datatype This is a type
- Page 603 and 604:
Procedures when you call the subpro
- Page 605 and 606:
RAISE Statement Example Related Top
- Page 607 and 608:
Records field_name This identifies
- Page 609 and 610:
Records User-defined records follow
- Page 611 and 612:
RESTRICT_REFERENCES Pragma RNDS Thi
- Page 613 and 614:
RETURN Statement RETURN Statement S
- Page 615 and 616:
ROLLBACK Statement ROLLBACK Stateme
- Page 617 and 618:
%ROWTYPE Attribute %ROWTYPE Attribu
- Page 619 and 620:
SAVEPOINT Statement SAVEPOINT State
- Page 621 and 622:
SELECT INTO Statement select_item f
- Page 623 and 624:
SELECT INTO Statement TABLE (subque
- Page 625 and 626:
SERIALLY_REUSABLE Pragma SERIALLY_R
- Page 627 and 628:
SET TRANSACTION Statement SET TRANS
- Page 629 and 630:
SQL Cursor SQL Cursor Oracle implic
- Page 631 and 632:
SQL Cursor You can use the scalar a
- Page 633 and 634:
SQLCODE Function Example Related To
- Page 635 and 636:
SQLERRM Function Passing a positive
- Page 637 and 638:
%TYPE Attribute object_name This id
- Page 639 and 640:
UPDATE Statement column_name This i
- Page 641 and 642:
UPDATE Statement Usage Notes Exampl
- Page 643 and 644:
A Sample PL/SQL Programs This appen
- Page 645 and 646:
Sample 1. FOR Loop Sample 1. FOR Lo
- Page 647 and 648:
Sample 2. Cursors PL/SQL Block -- a
- Page 649 and 650:
Sample 4. Batch Transaction Process
- Page 651 and 652:
Sample 4. Batch Transaction Process
- Page 653 and 654:
Sample 5. Embedded PL/SQL Sample 5.
- Page 655 and 656:
Sample 5. Embedded PL/SQL EXCEPTION
- Page 657 and 658:
Sample 6. Calling a Stored Procedur
- Page 659 and 660:
Sample 6. Calling a Stored Procedur
- Page 661 and 662:
B CHAR versus VARCHAR2 Semantics Th
- Page 663 and 664:
Comparing Character Values ANSI/ISO
- Page 665 and 666:
Selecting Character Values When you
- Page 667 and 668:
C PL/SQL Wrap Utility This appendix
- Page 669 and 670:
Running the Wrap Utility wrap iname
- Page 671 and 672:
D PL/SQL Name Resolution This appen
- Page 673 and 674:
Various Forms of References Various
- Page 675 and 676:
Name-Resolution Algorithm The lengt
- Page 677 and 678:
Understanding Capture Understanding
- Page 679 and 680:
Accessing Attributes and Methods Ou
- Page 681 and 682:
Calling Subprograms and Methods SEL
- Page 683 and 684:
E PL/SQL Program Limits PL/SQL is d
- Page 685 and 686:
SQL> SELECT * FROM user_object_size
- Page 687 and 688:
F List of PL/SQL Reserved Words The
- Page 689 and 690:
VARCHAR* VARCHAR2* VARIANCE VIEW* W
- Page 691 and 692:
Index Symbols %BULK_EXCEPTIONS curs
- Page 693 and 694:
character values assigning, B-2 com
- Page 695 and 696:
TIMESTAMP WITH TIME ZONE, 3-17 UROW
- Page 697 and 698:
G parts, 8-7 RETURN clause, 8-7 spe
- Page 699 and 700:
EXTEND, 5-32 FIRST, 5-30 LAST, 5-30
- Page 701 and 702:
PIPE ROW statement for returning ro
- Page 703 and 704:
statement-level, 6-46 routines, ext
- Page 705 and 706:
defining, 3-22 DOUBLE PRECISION, 3-