PL/SQL User's Guide and Reference
Release 8.0

A58236-01

Library

Product

Contents

Prev

Index

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 


Symbols

+ addition/identity operator, 2-3
:= assignment operator, 1-4, 2-5
=> association operator, 2-5, 7-12
% attribute indicator, 1-7, 2-3
' character string delimiter, 2-3
. component selector, 1-6, 2-3
|| concatenation operator, 2-5, 2-53
/ division operator, 2-3
** exponentiation operator, 2-5
( expression or list delimiter, 2-3
) expression or list delimiter, 2-3
: host variable indicator, 2-3
. item separator, 2-3
<< label delimiter, 2-5
>> label delimiter, 2-5
/* multi-line comment delimiter, 2-5
*/ multi-line comment delimiter, 2-5
* multiplication operator, 2-3
" quoted identifier delimiter, 2-3
.. range operator, 2-5, 3-10
= relational operator, 2-3, 2-52
< relational operator, 2-3, 2-52
> relational operator, 2-3, 2-52
<> relational operator, 2-5, 2-52
!= relational operator, 2-5, 2-52
~= relational operator, 2-5, 2-52
<= relational operator, 2-5, 2-52
>= relational operator, 2-5, 2-52
@ remote access indicator, 2-3, 2-40
-- single-line comment delimiter, 2-5
; statement terminator, 2-3, 11-12
- subtraction/negation operator, 2-3

A

abstraction, 7-3, 9-2
ACCESS_INTO_NULL exception, 6-5
actual parameter, 5-11
address, 5-19
aggregate assignment, 2-37
alias library, 10-3
aliasing, 5-36
ALL comparison operator, 5-6
ALL option, 5-3
ALL row operator, 5-7
anonymous PL/SQL block, 7-2
ANY comparison operator, 5-6
apostrophe, 2-11
architecture, 1-18
assignment
aggregate, 2-37
character string, C-2
collection, 4-13
cursor variable, 5-34
field, 4-36
record, 4-36
semantics, C-2
assignment operator, 1-4
assignment statement
syntax, 11-3
association operator, 7-12
asterisk (*) option, 5-3
asynchronous operation, 8-18
atomically null, 9-25
attribute, 1-7
%ROWTYPE, 2-36
%TYPE, 2-35
cursor, 5-38
object, 9-3, 9-7
attribute indicator, 1-7
AVG group function, 5-3

B

base type, 2-15, 2-26
basic loop, 3-6
BETWEEN comparison operator, 2-53, 5-6
BFILE datatype, 2-24
binary operator, 2-47
BINARY_INTEGER datatype, 2-14
bind variable, 5-19
binding, 5-7
blank-padding semantics, C-3
BLOB datatype, 2-24
block
anonymous, 7-2
label, 2-45
maximum size, 5-64
PL/SQL, 11-7
structure, 1-2
body
cursor, 5-15
function, 7-5
method, 9-8
object, 9-5
package, 8-7
procedure, 7-4
Boolean
expression, 2-53
literal, 2-11
value, 2-53
BOOLEAN datatype, 2-25
built-in function, 2-60
BY REF phrase, 10-15
by-reference parameter passing, 7-17
by-value parameter passing, 7-17

C

call, subprogram, 7-12
callback, 10-22
example, 10-22
restrictions, 10-23
CALLING STANDARD clause, 10-4
carriage return, 2-3
case sensitivity
identifier, 2-7
string literal, 2-11
case, lower, xxi
case, upper, xxi
CHAR column
maximum width, 2-18
CHAR datatype, 2-18
CHAR semantics, C-1
CHAR_CS value, 2-33
character literal, 2-10
character set, 2-2
CHARACTER subtype, 2-18
character value
assigning, C-2
comparing, C-2
inserting, C-4
selecting, C-4
CHARSETFORM property, 10-15
CHARSETID property, 10-15
client program, 9-2
CLOB datatype, 2-24
CLOSE statement, 5-13, 5-27
syntax, 11-14
collating sequence, 2-55
collection, 4-2
assigning, 4-13
comparing, 4-14
constructor, 4-10
declaring, 4-8
defining, 4-5
element type, 4-5
initializing, 4-10
referencing, 4-12
scope, 4-10
syntax, 11-21
collection exceptions
when raised, 4-30
collection method
applying to parameters, 4-29
COUNT, 4-24
DELETE, 4-28
EXISTS, 4-24
EXTEND, 4-26
FIRST, 4-25
LAST, 4-25
LIMIT, 4-24
NEXT, 4-25
PRIOR, 4-25
syntax, 11-16
TRIM, 4-27
collection types, 4-1
COLLECTION_IS_NULL exception, 6-5
column alias, 5-17
when needed, 2-38
comment, 2-12
restrictions, 2-13
syntax, 11-26
COMMENT clause, 5-47
COMMIT statement, 5-47
syntax, 11-27
comparison
of character values, C-2
of collections, 4-14
of expressions, 2-53
operators, 2-51, 5-6
compilation
using the PL/SQL Wrapper, D-1
compiler, 5-7
component selector, 1-6
composite type, 2-13
compound symbol, 2-5
concatenation operator, 2-53
treatment of nulls, 2-59
concurrency, 5-45
conditional control, 3-2
constant
declaring, 2-34
syntax, 11-29
constraint
NOT NULL, 2-35
where not allowed, 2-27, 7-4
constructor
collection, 4-10
object, 9-12
control structure, 3-2
conditional, 3-2
iterative, 3-6
sequential, 3-15
conventions
naming, 2-40
conversion function
when needed, 2-31
conversion, datatype, 2-29
correlated subquery, 5-14
COUNT collection method, 4-24
COUNT group function, 5-3
CREATE LIBRARY statement, 10-3
CURRENT OF clause, 5-55
current row, 1-5
CURRVAL pseudocolumn, 5-4
cursor, 1-5, 5-9
analogy, 1-5
closing, 5-13
declaring, 5-10
explicit, 5-9
fetching from, 5-12
implicit, 5-14
opening, 5-11
packaged, 5-15
parameterized, 5-11
RETURN clause, 5-15
scope rules, 5-10
syntax, 11-45
cursor attribute
%FOUND, 5-38, 5-43
%ISOPEN, 5-38, 5-43
%NOTFOUND, 5-39
%ROWCOUNT, 5-39, 5-44
implicit, 5-43
syntax, 11-33
values, 5-41
cursor FOR loop, 5-16
passing parameters to, 5-18
cursor variable, 5-18
assignment, 5-34
closing, 5-27
declaring, 5-20
fetching from, 5-26
opening, 5-22
restrictions, 5-37
syntax, 11-38
using to reduce network traffic, 5-33
CURSOR_ALREADY_OPEN exception, 6-5

D

dangling ref, 9-38
data abstraction, 9-2
data encapsulation, 1-16
data integrity, 5-45
data lock, 5-46
database changes
making permanent, 5-47
undoing, 5-49
database character set, 2-22
datatype, 2-13
BFILE, 2-24
BINARY_INTEGER, 2-14
BLOB, 2-24
BOOLEAN, 2-25
CHAR, 2-18
CLOB, 2-24
constraint, 7-4
DATE, 2-25
families, 2-13
implicit conversion, 2-31
LONG, 2-19
LONG RAW, 2-19
MLSLABEL, 2-26
NCHAR, 2-22
NCLOB, 2-25
NLS, 2-21
NUMBER, 2-15
NVARCHAR2, 2-23
PLS_INTEGER, 2-17
RAW, 2-19
RECORD, 4-31
REF CURSOR, 5-19
ROWID, 2-20
scalar versus composite, 2-13
TABLE, 4-2
VARCHAR2, 2-20
VARRAY, 4-4
date
converting, 2-32
TO_CHAR default format, 2-32
DATE datatype, 2-25
DBMS_ALERT package, 8-18
DBMS_OUTPUT package, 8-16
DBMS_PIPE package, 8-17
DBMS_SQL package, 5-8, 8-18
array interface, 5-61
DBMS_STANDARD package, 8-16
DDL support, 5-7
deadlock, 5-46
effect on transactions, 5-49
how broken, 5-49
DEBUG_EXTPROC package, 10-25
DEC subtype, 2-17
DECIMAL subtype, 2-17
declaration
collection, 4-8
constant, 2-34
cursor, 5-10
cursor variable, 5-20
exception, 6-6
forward, 7-8
object, 9-24
record, 4-32
subprogram, 7-8
variable, 2-33
declarative part
function, 7-6
PL/SQL block, 1-3
procedure, 7-4
DECODE function
treatment of nulls, 2-59
DEFAULT keyword, 2-34
default parameter value, 7-15
default pragma, 9-13
DELETE collection method, 4-28
DELETE statement
RETURNING clause, 5-59
syntax, 11-49
delimiter, 2-3
demo, external procedure, 10-25
dense collection, 4-3
DEPT table, xxii
DEREF operator, 9-38
dereference, 9-38
digits of precision, 2-15
DISTINCT option, 5-3
DISTINCT row operator, 5-7
distributed transaction, 5-46
DLL (dynamic link library), 10-3
dot notation, 1-6, 1-7
for collection methods, 4-23
for global variables, 3-13
for object attributes, 9-26
for object methods, 9-28
for package contents, 8-6
for record fields, 2-37
DOUBLE PRECISION subtype, 2-17
DUP_VAL_ON_INDEX exception, 6-5
dynamic FOR-loop range, 3-12
dynamic link library (DLL), 10-3
dynamic SQL support, 5-7

E

elaboration, 2-34
element type
collection, 4-5
ellipsis, xxi
ELSE clause, 3-3
ELSIF clause, 3-4
EMP table, xxii
encapsulation, data, 1-16
END IF reserved words, 3-3
END LOOP reserved words, 3-9
Entry SQL support, 5-7
error message
maximum length, 6-19
evaluation, 2-47
short-circuit, 2-51
EXAMPBLD script, B-3
EXAMPLOD script, B-7
exception, 6-2
declaring, 6-6
predefined, 6-4
propagation, 6-13
raised in declaration, 6-17
raised in handler, 6-18
raising with RAISE statement, 6-12
reraising, 6-15
scope rules, 6-7
syntax, 11-54
user-defined, 6-6
WHEN clause, 6-16
exception handler, 6-16
branching from, 6-18
OTHERS handler, 6-2
using RAISE statement in, 6-16
using SQLCODE function in, 6-19
using SQLERRM function in, 6-19
EXCEPTION_INIT pragma, 6-9
syntax, 11-52
using with raise_application_error, 6-11
exception-handling part
function, 7-6
PL/SQL block, 1-3
procedure, 7-4
executable part
function, 7-6
PL/SQL block, 1-3
procedure, 7-4
execution environment, 1-18
EXISTS collection method, 4-24
EXISTS comparison operator, 5-6
EXIT statement, 3-6, 3-14
syntax, 11-57
WHEN clause, 3-7
where allowed, 3-6
explicit cursor, 5-9
expression
Boolean, 2-53
how evaluated, 2-47
parentheses in, 2-48
syntax, 11-59
EXTEND collection method, 4-26
extensibility, 7-3
EXTERNAL clause, 10-3
components, 10-4
syntax, 11-73
external procedure, 10-2
calling, 10-5
DEBUG_EXTPROC package, 10-25
debugging, 10-25
demo program, 10-25
environment variables, 10-8
guidelines, 10-26
how PL/SQL calls, 10-7
maximum number of parameters, 10-27
passing parameters to, 10-9
registering, 10-3
restrictions, 10-26
specifying datatypes, 10-9
specifying properties, 10-12
extproc process, 10-7

F

FALSE value, 2-11
features, new, A-1
FETCH statement, 5-12, 5-26
syntax, 11-79
fetching across commits, 5-56
Fibonacci sequence, 7-23
field, 4-31
field type, 4-31
file I/O, 8-17
FIRST collection method, 4-25
flag, PLSQL_V2_COMPATIBILITY, 5-66
FLOAT subtype, 2-17
FOR loop, 3-10
dynamic range, 3-12
iteration scheme, 3-10
loop counter, 3-10
nested, 3-14
FOR loop, cursor, 5-16
FOR UPDATE clause, 5-11
restriction on, 5-22
when to use, 5-53
formal parameter, 5-11
format
function, 7-5
package, 8-2
packaged procedure, 7-9
procedure, 7-3
format mask
when needed, 2-32
forward declaration, 7-8
when needed, 7-8, 7-26
forward reference, 2-39
forward type definition, 9-33
%FOUND cursor attribute, 5-38, 5-43
function, 7-1, 7-5
body, 7-5
built-in, 2-60
call, 7-6
parameter, 7-5
parts, 7-5
RETURN clause, 7-5
specification, 7-5
syntax, 11-82

G

gigabyte, 2-24
GLB group function, 5-3
GOTO statement, 3-15
label, 3-15
misuse, 3-17
restriction, 6-18
syntax, 11-86
GROUP BY clause, 5-3
group function
AVG, 5-3
COUNT, 5-3
GLB, 5-3
LUB, 5-3
MAX, 5-3
MIN, 5-3
STDDEV, 5-3
SUM, 5-3
treatment of nulls, 5-3
VARIANCE, 5-3

H

handler, exception, 6-2
handling exceptions, 6-1
raised in declaration, 6-17
raised in handler, 6-18
using OTHERS handler, 6-16
handling of nulls, 2-57
hidden declaration, 8-2
hiding, information, 1-16
host variable, 5-19
hypertext markup language (HTML), 8-17
hypertext transfer protocol (HTTP), 8-17

I

identifier
forming, 2-6
maximum length, 2-7
quoted, 2-8
scope rules, 2-43
IF statement, 3-2
ELSE clause, 3-3
ELSIF clause, 3-4
syntax, 11-88
THEN clause, 3-3
implicit cursor, 5-14
attribute, 5-43
implicit datatype conversion, 2-31
effect on performance, 5-63
implicit declaration
cursor FOR loop record, 5-16
FOR loop counter, 3-13
IN comparison operator, 2-53, 5-6
IN OUT parameter mode, 7-14
IN parameter mode, 7-13
incomplete object type, 9-33
index, cursor FOR loop, 5-16
index-by table, 4-3
indicator, 10-14
INDICATOR property, 10-14
infinite loop, 3-6
information hiding, 1-16, 8-4
initialization
collection, 4-10
object, 9-25
package, 8-8
record, 4-33
using DEFAULT, 2-34
variable, 2-46
when required, 2-35
INSERT statement
RETURNING clause, 5-59
syntax, 11-91
instance, 9-4
INT subtype, 2-17
INTEGER subtype, 2-17
interoperability, cursor, 5-19
INTERSECT set operator, 5-6
INTO clause, 5-26
INTO list, 5-12
INVALID_CURSOR exception, 6-5
INVALID_NUMBER exception, 6-5
IS DANGLING predicate, 9-38
IS NULL comparison operator, 2-52, 5-6
%ISOPEN cursor attribute, 5-38, 5-43
iteration
scheme, 3-10
versus recursion, 7-27
iterative control, 3-6

J

join, 7-26

L

label
block, 2-45
GOTO statement, 3-15
loop, 3-8
LANGUAGE clause, 10-4
large object (LOB) datatypes, 2-23
LAST collection method, 4-25
LENGTH property, 10-14
LEVEL pseudocolumn, 5-5
lexical unit, 2-2
library, 8-1
LIBRARY clause, 10-4
library, alias, 10-3
LIKE comparison operator, 2-52, 5-6
LIMIT collection method, 4-24
literal, 2-9
Boolean, 2-11
character, 2-10
numeric, 2-9
string, 2-11
syntax, 11-94
LOB (large object) datatypes, 2-23
local subprogram, 1-19
locator, 2-24
lock, 5-46
modes, 5-46
overriding, 5-53
using FOR UPDATE clause, 5-53
LOCK TABLE statement, 5-55
syntax, 11-97
LOGIN_DENIED exception, 6-5
LONG datatype, 2-19
maximum length, 2-19
restrictions, 2-19
LONG RAW datatype, 2-19
converting, 2-33
maximum length, 2-19
loop
counter, 3-10
kinds, 3-6
label, 3-8
LOOP statement, 3-6
forms, 3-6
syntax, 11-99
LUB group function, 5-3

M

maintainability, 7-3
map method, 9-10
MAX group function, 5-3
maximum length
CHAR value, 2-18
identifier, 2-7
LONG RAW value, 2-19
LONG value, 2-19
NCHAR value, 2-22
NVARCHAR2 value, 2-23
Oracle error message, 6-19
RAW value, 2-19
VARCHAR2 value, 2-20
maximum precision, 2-15
maximum size
LOB, 2-23
MAXLEN property, 10-14
membership test, 2-53
method
COUNT, 4-24
DELETE, 4-28
EXISTS, 4-24
EXTEND, 4-26
FIRST, 4-25
LAST, 4-25
LIMIT, 4-24
map, 9-10
NEXT, 4-25
object, 9-3, 9-8
order, 9-10
PRIOR, 4-25
TRIM, 4-27
method calls
chaining, 9-29
method, collection, 4-23
MIN group function, 5-3
MINUS set operator, 5-6
mixed notation, 7-12
MLSLABEL datatype, 2-26
mode, parameter
IN, 7-13
IN OUT, 7-14
OUT, 7-13
modularity, 1-11, 7-3, 8-4
multi-line comment, 2-12
mutual recursion, 7-26

N

name
cursor, 5-10
qualified, 2-40
savepoint, 5-50
variable, 2-40
NAME clause, 10-4
name resolution, 2-41, E-1
named notation, 7-12
naming conventions, 2-40
national character set, 2-22
National Language Support (NLS), 2-21
NATURAL subtype, 2-15
NATURALN subtype, 2-15
NCHAR datatype, 2-22
NCHAR_CS value, 2-33
NCLOB datatype, 2-25
nested table, 4-2
manipulating, 4-15
versus index-by table, 4-3
nesting
block, 1-3
FOR loop, 3-14
object, 9-7
record, 4-32
network traffic
reducing, 1-22
new features, A-1
NEXT collection method, 4-25
NEXTVAL pseudocolumn, 5-4
nibble, 2-33
NLS (National Language Support), 2-21
NLS datatype, 2-21
NLS_CHARSET_ID function, 2-33
NLS_CHARSET_NAME function, 2-33
NO_DATA_FOUND exception, 6-5
non-blank-padding semantics, C-3
NOT logical operator
treatment of nulls, 2-58
NOT NULL constraint
effect on %TYPE declaration, 2-36
effect on performance, 5-62
restriction, 5-10, 7-3
using in collection declaration, 4-8
using in field declaration, 4-33
using in variable declaration, 2-35
NOT_LOGGED_ON exception, 6-6
notation
mixed, 7-12
positional versus named, 7-12
%NOTFOUND cursor attribute, 5-39
NOWAIT parameter, 5-53
NVARCHAR2 datatype, 2-23
NVL function
treatment of nulls, 2-59
null handling, 2-57
NULL statement, 3-19
syntax, 11-106
using in a procedure, 7-4
nullity, 2-52
NUMBER datatype, 2-15
numeric literal, 2-9
NUMERIC subtype, 2-17

O

object, 9-4
declaring, 9-24
initializing, 9-25
manipulating, 9-34
sharing, 9-30
object attribute, 9-3, 9-7
accessing, 9-26
allowed datatypes, 9-7
maximum number, 9-7
object constructor
calling, 9-27
passing parameters to, 9-28
object method, 9-3, 9-8
calling, 9-28
object table, 9-34
object type, 9-1, 9-3
advantages, 9-5
defining, 9-14
examples, 9-14
structure, 9-5
syntax, 11-107
object-oriented programming, 9-1
OPEN statement, 5-11
syntax, 11-115
OPEN-FOR statement, 5-22
syntax, 11-117
operator
comparison, 2-51
concatenation, 2-53
DEREF, 9-38
precedence, 2-48
REF, 9-36
relational, 2-52
VALUE, 9-35
OR keyword, 6-17
Oracle, Trusted, 2-13
order method, 9-10
order of evaluation, 2-48, 2-49
OTHERS exception handler, 6-2, 6-16
OUT parameter mode, 7-13
overloading, 7-18
object method, 9-10
packaged subprogram, 8-14
restrictions, 7-19
using subtypes, 7-20

P

package, 8-1, 8-2
advantages, 8-4
bodiless, 8-6
body, 8-2
creating, 8-3
DEBUG_EXTPROC, 10-25
initializing, 8-8
private versus public objects, 8-14
referencing, 8-6
scope, 8-5
serially reusable, 5-59
specification, 8-2
syntax, 11-121
package, product-specific, 8-16
packaged cursor, 5-15
packaged subprogram, 1-19, 7-9
calling, 8-6
overloading, 8-14
parameter
actual versus formal, 7-11
cursor, 5-11
default values, 7-15
modes, 7-13
SELF, 9-8
parameter passing
by reference, 7-17
by value, 7-17
PARAMETERS clause, 10-5, 10-12
parentheses, 2-48
Pascal Calling Standard, 10-4
pattern matching, 2-52
p-code, 5-8
performance, 1-22
improving, 5-57
pipe, 8-17
PL/SQL
advantages, 1-21
architecture, 1-18
block structure, 1-2
execution environments, 1-18
new features, A-1
performance, 1-22
portability, 1-23
procedural aspects, 1-2
reserved words, F-1
sample programs, B-1
support for SQL, 1-21
PL/SQL block
anonymous, 1-2, 7-2
maximum size, 5-64
syntax, 11-7
PL/SQL compiler
how calls are resolved, 7-21
how it works, 5-8
how references are resolved, 5-7
PL/SQL engine, 1-18
in Oracle Server, 1-19
in Oracle tools, 1-20
PL/SQL syntax, 11-1
PL/SQL Wrapper, D-1
input and output files, D-3
running, D-2
PLS_INTEGER datatype, 2-17
PLSQL_V2_COMPATIBILITY flag, 5-66
pointer, 5-19
portability, 1-23
positional notation, 7-12
POSITIVE subtype, 2-15
POSITIVEN subtype, 2-15
pragma, 6-9
EXCEPTION_INIT, 6-9
RESTRICT_REFERENCES, 7-6, 9-12
SERIALLY_REUSABLE, 5-59
precedence, operator, 2-48
precision of digits
specifying, 2-15
predefined exception
list of, 6-4
raising explicitly, 6-12
redeclaring, 6-11
predicate, 5-6
PRIOR collection method, 4-25
PRIOR row operator, 5-5, 5-7
private object, 8-14
procedural abstraction, 9-2
procedure, 7-1, 7-3
body, 7-4
calling, 7-5
external, 10-2
parameter, 7-3
parts, 7-4
specification, 7-4
syntax, 11-125
productivity, 1-23
program unit, 1-11
PROGRAM_ERROR exception, 6-6
propagation, exception, 6-13
property
CHARSETFORM, 10-15
CHARSETID, 10-15
INDICATOR, 10-14
LENGTH, 10-14
MAXLEN, 10-14
pseudocolumn, 5-4
CURRVAL, 5-4
LEVEL, 5-5
NEXTVAL, 5-4
ROWID, 5-5
ROWNUM, 5-5
pseudoinstruction, 6-9
public object, 8-14
purity level, 9-12

Q

qualifier
using subprogram name as, 2-43
when needed, 2-40, 2-45
query work area, 5-19
quoted identifier, 2-8

R

RAISE statement, 6-12
syntax, 11-130
using in exception handler, 6-16
raise_application_error procedure, 6-10
raising an exception, 6-12
range operator, 3-10
RAW datatype, 2-19
converting, 2-33
maximum length, 2-19
read consistency, 5-46
READ ONLY parameter, 5-52
readability, 2-2, 3-19
read-only transaction, 5-52
REAL subtype, 2-17
record, 4-31
%ROWTYPE, 5-16
assigning, 4-36
comparing, 4-38
declaring, 4-32
defining, 4-31
implicit declaration, 5-16
initializing, 4-33
manipulating, 4-38
nesting, 4-32
referencing, 4-34
syntax, 11-132
RECORD datatype, 4-31
recursion, 7-23
infinite, 7-24
mutual, 7-26
terminating condition, 7-24
versus iteration, 7-27
ref, 9-30
dangling, 9-38
declaring, 9-31
dereferencing, 9-38
REF CURSOR datatype, 5-19
defining, 5-20
REF operator, 9-36
REF type modifier, 9-31
reference type, 2-13
relational operator, 2-52
remote access indicator, 2-40
REPEAT UNTIL structure
mimicking, 3-10
REPLACE function
treatment of nulls, 2-60
reraising an exception, 6-15
reserved words, F-1
misuse of, 2-7
using as quoted identifier, 2-8
resolution, name, 2-41, E-1
RESTRICT_REFERENCES pragma, 9-12
result set, 1-5, 5-11
result value, function, 7-5
RETURN clause
cursor, 5-15
function, 7-5
RETURN statement, 7-7
syntax, 11-136
return type, 5-20, 7-21
RETURNING clause, 5-59, 9-42
reusability, 7-3
reusable packages, 5-59
REVERSE reserved word, 3-11
rollback
implicit, 5-51
statement-level, 5-49
rollback segment, 5-46
ROLLBACK statement, 5-49
effect on savepoints, 5-50
syntax, 11-138
routine
external, 10-2
service, 10-17
row lock, 5-53
row operator, 5-7
%ROWCOUNT cursor attribute, 5-39, 5-44
rowid, 2-20
ROWID datatype, 2-20
ROWID pseudocolumn, 5-5
ROWIDTOCHAR function, 5-5
ROWNUM pseudocolumn, 5-5
%ROWTYPE attribute, 2-36
syntax, 11-140
ROWTYPE_MISMATCH exception, 6-6
RPC (remote procedure call), 6-13
RTRIM function
using to insert data, C-4
runtime error, 6-1

S

sample database table
DEPT table, xxii
EMP table, xxii
sample programs, B-1
savepoint name
reusing, 5-50
SAVEPOINT statement, 5-50
syntax, 11-142
scalar type, 2-13
scale
specifying, 2-17
scheme, iteration, 3-10
scientific notation, 2-9
scope, 2-43
collection, 4-10
cursor, 5-10
cursor parameter, 5-10
definition, 2-43
exception, 6-7
identifier, 2-43
loop counter, 3-13
package, 8-5
SELECT INTO statement
syntax, 11-143
selector, 5-24
SELF parameter, 9-8
semantics
assignment, C-2
blank-padding, C-3
CHAR versus VARCHAR2, C-1
non-blank-padding, C-3
string comparison, C-2
separator, 2-3
sequence, 5-4
sequential control, 3-15
serially reusable package, 5-59
SERIALLY_REUSABLE pragma, 5-59
server
integration with PL/SQL, 1-23
service routine, 10-17
examples, 10-17
session, 5-45
session-specific variables, 8-11
set operator, 5-6
SET TRANSACTION statement, 5-52
syntax, 11-146
short-circuit evaluation, 2-51
side effects, 7-13, 9-12
significant characters, 2-7
SIGNTYPE subtype, 2-15
simple symbol, 2-3
single-line comment, 2-12
size constraint, subtype, 2-27
size limit, varray, 4-5
SMALLINT subtype, 2-17
snapshot, 5-46
SOME comparison operator, 5-6
spaces
where allowed, 2-2
spaghetti code, 3-15
sparse collection, 4-3
specification
cursor, 5-15
function, 7-5
method, 9-8
object, 9-5
package, 8-5
procedure, 7-4
SQL
comparison operators, 5-6
data manipulation statements, 5-2
pseudocolumn, 5-4
row operators, 5-7
set operators, 5-6
support in PL/SQL, 1-21
SQL cursor
syntax, 11-148
SQL standards conformance, 5-7
SQL92 conformance, 5-7
SQLCODE function, 6-19
syntax, 11-150
SQLERRM function, 6-19
syntax, 11-151
stack, 9-14
standalone subprogram, 1-19
START WITH clause, 5-5
statement
assignment, 11-3
CLOSE, 5-13, 5-27, 11-14
COMMIT, 11-27
CREATE LIBRARY, 10-3
DELETE, 11-49
EXIT, 11-57
FETCH, 5-12, 5-26, 11-79
GOTO, 11-86
IF, 11-88
INSERT, 11-91
LOCK TABLE, 11-97
LOOP, 11-99
NULL, 11-106
OPEN, 5-11, 11-115
OPEN-FOR, 5-22, 11-117
RAISE, 11-130
RETURN, 11-136
ROLLBACK, 11-138
SAVEPOINT, 11-142
SELECT INTO, 11-143
SET TRANSACTION, 11-146
UPDATE, 11-155
statement terminator, 11-12
statement-level rollback, 5-49
STDDEV group function, 5-3
STEP clause
mimicking, 3-12
stepwise refinement, 1-2
STORAGE_ERROR exception, 6-6
when raised, 7-24
store table, 4-5
stored subprogram, 1-19, 7-10
string comparison semantics, C-2
string literal, 2-11
STRING subtype, 2-21
structure theorem, 3-2
stub, 3-19, 7-3
subprogram, 7-2
advantages, 7-3
declaring, 7-8
how calls are resolved, 7-21
local, 1-19
overloading, 7-18
packaged, 1-19, 7-9
parts, 7-2
procedure versus function, 7-5
recursive, 7-24
standalone, 1-19
stored, 1-19, 7-10
subquery, 5-14
SUBSCRIPT_BEYOND_COUNT exception, 6-6
SUBSCRIPT_OUTSIDE_LIMIT exception, 6-6
SUBSTR function, 6-21
subtype, 2-15, 2-26
CHARACTER, 2-18
compatibility, 2-28
DEC, 2-17
DECIMAL, 2-17
defining, 2-27
DOUBLE PRECISION, 2-17
FLOAT, 2-17
INT, 2-17
INTEGER, 2-17
NATURAL, 2-15
NATURALN, 2-15
NUMERIC, 2-17
overloading, 7-20
POSITIVE, 2-15
POSITIVEN, 2-15
REAL, 2-17
SIGNTYPE, 2-15
SMALLINT, 2-17
STRING, 2-21
VARCHAR, 2-21
SUM group function, 5-3
support for SQL, 5-2
symbol
compound, 2-5
simple, 2-3
syntax definition, 11-1
syntax diagram, reading, 11-2

T

tab, 2-3
TABLE datatype, 4-2
table, index-by, 4-3
table, nested, 4-2
terminating condition, 7-24
terminator
statement, 2-3
ternary operator, 2-47
THEN clause, 3-3
TIMEOUT_ON_RESOURCE exception, 6-6
TOO_MANY_ROWS exception, 6-6
top-down design, 1-16
trailing blanks
how handled, C-4
transaction, 5-2, 5-46
committing, 5-47
distributed, 5-46
ending properly, 5-51
read-only, 5-52
rolling back, 5-49
transaction processing, 5-2, 5-45
TRIM collection method, 4-27
TRUE value, 2-11
Trusted Oracle, 2-13
%TYPE attribute, 2-35
syntax, 11-153
type definition
collection, 4-5
forward, 9-33
RECORD, 4-31
REF CURSOR, 5-20

U

unary operator, 2-47
underscore, 2-6
unhandled exception, 6-13, 6-21
uninitialized object
how treated, 9-26
UNION ALL set operator, 5-6
UNION set operator, 5-6
UPDATE statement
RETURNING clause, 5-59
syntax, 11-155
URL (universal resource locator), 8-17
user session, 5-45
user-defined exception, 6-6
user-defined record, 4-31
declaring, 4-32
referencing, 4-34
user-defined subtype, 2-26
UTL_FILE package, 8-17
UTL_HTTP package, 8-17

V

VALUE operator, 9-35
VALUE_ERROR exception, 6-6
VARCHAR subtype, 2-21
VARCHAR2 datatype, 2-20
VARCHAR2 semantics, C-1
variable
assigning values, 2-46
declaring, 2-33
initializing, 2-46
session-specific, 8-11
syntax, 11-29
VARIANCE group function, 5-3
varray
size limit, 4-5
VARRAY datatype, 4-4
visibility
of package contents, 8-2
versus scope, 2-43

W

WHEN clause, 3-7, 6-16
WHILE loop, 3-9
wildcard, 2-52
WITH CONTEXT clause, 10-5, 10-16
words, reserved, F-1
work area, query, 5-19

Z

ZERO_DIVIDE exception, 6-6


Prev
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents