PL/SQL User's Guide and Reference
Release 8.1.6

Part Number A77069-01

Library

Product

Contents

Go to previous page

Index

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


Symbols

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

A

abstraction, 7-3, 9-2
ACCESS_INTO_NULL exception, 6-5
actual parameters, 5-8
address, 5-16
aggregate assignment, 2-34
aggregate functions
AVG, 5-3
COUNT, 5-3
GROUPING, 5-3
MAX, 5-3
MIN, 5-3
STDDEV, 5-3
SUM, 5-3
treatment of nulls, 5-3
VARIANCE, 5-3
aliasing, 7-22
ALL row operator, 5-3, 5-5
anonymous PL/SQL block, 7-2
ANY comparison operator, 5-5
apostrophes, 2-9
architecture, 1-17
assignment operator, 1-4
assignment statement
syntax, 11-3
assignments
aggregate, 2-34
character string, B-2
collection, 4-11
cursor variable, 5-32
field, 4-47
record, 4-47
semantics, B-2
association operator, 7-13
asterisk (*) row operator, 5-3
asynchronous operations, 8-17
atomically null, 9-23
attribute indicator, 1-7
attributes, 1-7
%ROWTYPE, 2-33
%TYPE, 2-32
cursor, 5-35
object, 9-3, 9-7
AUTHID clause, 7-4, 7-6, 7-31
autonomous transactions, 5-52
advantages, 5-52
controlling, 5-56
autonomous triggers, 5-58
AUTONOMOUS_TRANSACTION pragma, 5-53
syntax, 11-7
AVG aggregate function, 5-3

B

base types, 2-13, 2-25
basic loops, 3-6
BETWEEN comparison operator, 2-46, 5-5
BFILE datatype, 2-22
binary operators, 2-42
BINARY_INTEGER datatype, 2-12
bind argument, 10-3
binding, 4-30
blank-padding semantics, B-3
BLOB datatype, 2-23
blocks
anonymous, 7-2
label, 2-40
PL/SQL, 11-10
structure, 1-2
body
cursor, 5-12
function, 7-7
method, 9-8
object, 9-5
package, 8-8
procedure, 7-4
BOOLEAN datatype, 2-23
Boolean expressions, 2-47
Boolean literals, 2-9
built-in functions, 2-52
bulk binds, 4-29
BULK COLLECT clause, 4-37
bulk fetches, 4-38
bulk returns, 4-39
%BULK_ROWCOUNT cursor attribute, 4-34
by-reference parameter passing, 7-22
by-value parameter passing, 7-22

C

call specification, 8-3
calls
inter-language, 7-44
subprogram, 7-13
carriage returns, 2-2
case sensitivity
identifier, 2-5
string literal, 2-9
CHAR
datatype, 2-15
semantics, B-1
CHAR column
maximum width, 2-15
character literals, 2-8
character sets, 2-2
CHARACTER subtype, 2-15
character values
assigning, B-2
comparing, B-2
inserting, B-4
selecting, B-4
clauses
AUTHID, 7-4, 7-6, 7-31
BULK COLLECT, 4-37
LIMIT, 4-39
client programs, 9-2
CLOB datatype, 2-23
CLOSE statement, 5-11, 5-24
syntax, 11-17
collating sequence, 2-48
collection exceptions
when raised, 4-28
collection methods
applying to parameters, 4-27
COUNT, 4-22
DELETE, 4-26, 11-20
EXISTS, 4-22
EXTEND, 4-24
FIRST, 4-23
LAST, 4-23
LIMIT, 4-22
NEXT, 4-23
PRIOR, 4-23
syntax, 11-19
TRIM, 4-25
COLLECTION_IS_NULL exception, 6-5
collections, 4-2
assigning, 4-11
bulk binding, 4-29
comparing, 4-13
constructors, 4-8
declaring, 4-7
defining, 4-5
element types, 4-5
initializing, 4-8
kinds, 4-1
referencing, 4-10
scope, 4-8
syntax, 11-24
column alias, 5-14
when needed, 2-35
COMMENT clause, 5-43
comments, 2-10
restrictions, 2-11
syntax, 11-30
COMMIT statement, 5-43
syntax, 11-31
comparison operators, 2-45, 5-5
comparisons
of character values, B-2
of collections, 4-13
of expressions, 2-47
compiler hint, NOCOPY, 7-17
component selector, 1-6
composite types, 2-11
compound symbols, 2-4
concatenation operator, 2-47
treatment of nulls, 2-51
concurrency, 5-41
conditional control, 3-2
constants
declaring, 2-31
syntax, 11-33
constraints
NOT NULL, 2-32
where not allowed, 7-4
constructors
collection, 4-8
object, 9-12
context
switching, 4-30
transaction, 5-55
control structures, 3-2
conditional, 3-2
iterative, 3-6
sequential, 3-15
conventions
naming, 2-36
conversion functions
when needed, 2-29
conversion, datatype, 2-28
correlated subquery, 5-11
COUNT aggregate function, 5-3
COUNT collection method, 4-22
CURRENT OF clause, 5-49
current row, 1-5
CURRVAL pseudocolumn, 5-3
cursor attributes
%BULK_ROWCOUNT, 4-34
%FOUND, 5-35, 5-39
%ISOPEN, 5-35, 5-39
%NOTFOUND, 5-36
%ROWCOUNT, 5-36, 5-40
implicit, 5-39
syntax, 11-37
values, 5-37
cursor FOR loop
passing parameters to, 5-15
cursor FOR loops, 5-13
cursor variables, 5-15
assignment, 5-32
closing, 5-24
declaring, 5-17
fetching from, 5-23
opening, 5-19
restrictions, 5-34
syntax, 11-42
using to reduce network traffic, 5-31
using with dynamic SQL, 10-7
CURSOR_ALREADY_OPEN exception, 6-5
cursors, 1-5, 5-6
analogy, 1-5
closing, 5-11
declaring, 5-7
explicit, 5-6
fetching from, 5-9
implicit, 5-11
opening, 5-8
packaged, 5-12
parameterized, 5-8
RETURN clause, 5-12
scope rules, 5-7
syntax, 11-48

D

dangling refs, 9-33
data
abstraction, 9-2
encapsulation, 1-16
integrity, 5-41
locks, 5-42
database changes
making permanent, 5-43
undoing, 5-44
database character set, 2-20
database triggers, 1-19
autonomous, 5-58
datatypes, 2-11
BFILE, 2-22
BINARY_INTEGER, 2-12
BLOB, 2-23
BOOLEAN, 2-23
CHAR, 2-15
CLOB, 2-23
constrained, 7-4
DATE, 2-24
families, 2-11
implicit conversion, 2-28
LONG, 2-16
LONG RAW, 2-16
national character, 2-20
NCHAR, 2-20
NCLOB, 2-23
NUMBER, 2-13
NVARCHAR2, 2-21
PLS_INTEGER, 2-14
RAW, 2-16
RECORD, 4-42
REF CURSOR, 5-16
ROWID, 2-17
scalar versus composite, 2-11
TABLE, 4-2
UROWID, 2-17
VARCHAR2, 2-19
VARRAY, 4-4
DATE datatype, 2-24
dates
converting, 2-29
TO_CHAR default format, 2-29
DBMS_ALERT package, 8-17
DBMS_OUTPUT package, 8-17
DBMS_PIPE package, 8-18
deadlocks, 5-42
effect on transactions, 5-44
how broken, 5-44
DEC subtype, 2-14
DECIMAL subtype, 2-14
declarations
collection, 4-7
constant, 2-31
cursor, 5-7
cursor variable, 5-17
exception, 6-7
forward, 7-10
object, 9-22
record, 4-43
subprogram, 7-10
variable, 2-30
declarative part
of function, 7-7
of PL/SQL block, 1-3
of procedure, 7-4
DECODE function
treatment of nulls, 2-51
DEFAULT keyword, 2-31
default parameter values, 7-20
define variable, 10-3
definer rights, 7-29
versus invoker rights, 7-29
DELETE collection method, 4-26, 11-20
DELETE statement
RETURNING clause, 5-64
syntax, 11-52
delimiters, 2-3
dense collections, 4-3
DEPT database table, xxi
DEREF function, 9-33
dereference, 9-33
DETERMINISTIC hint, 7-6
digits of precision, 2-13
DISTINCT operator, 5-3
DISTINCT row operator, 5-3, 5-6
distributed transactions, 5-42
dot notation, 1-6, 1-7
for collection methods, 4-21
for global variables, 3-13
for object attributes, 9-24
for object methods, 9-26
for package contents, 8-7
for record fields, 2-34
DOUBLE PRECISION subtype, 2-14
DUP_VAL_ON_INDEX exception, 6-5
dynamic FOR-loop range, 3-12
dynamic SQL, 10-2
tips and traps, 10-11
using EXECUTE IMMEDIATE statement, 10-3
using OPEN-FOR-USING statement, 10-7
dynamic string, 10-3

E

elaboration, 2-31
element types, collection, 4-5
ELSE clause, 3-3
ELSIF clause, 3-4
EMP database table, xxi
encapsulation, data, 1-16
END IF reserved words, 3-3
END LOOP reserved words, 3-9
entended rowids, 2-17
error messages
maximum length, 6-18
evaluation, 2-42
short-circuit, 2-45
EXAMPBLD script, A-3
EXAMPLOD script, A-3
exception handlers, 6-15
branching from, 6-17
OTHERS handler, 6-2
using RAISE statement in, 6-15
using SQLCODE function in, 6-18
using SQLERRM function in, 6-18
EXCEPTION_INIT pragma, 6-8
syntax, 11-56
using with raise_application_error, 6-10
exception-handling part
of function, 7-7
of PL/SQL block, 1-3
of procedure, 7-4
exceptions, 6-2
declaring, 6-7
predefined, 6-4
propagation, 6-12
raised in declaration, 6-16
raised in handler, 6-17
raising with RAISE statement, 6-11
reraising, 6-14
scope rules, 6-7
syntax, 11-58
user-defined, 6-7
WHEN clause, 6-15
executable part
of function, 7-7
of PL/SQL block, 1-3
of procedure, 7-4
EXECUTE IMMEDIATE statement, 10-3
EXECUTE privilege, 7-35
execution environments, 1-17
EXISTS collection method, 4-22
EXISTS comparison operator, 5-5
EXIT statement, 3-6, 3-14
syntax, 11-65
WHEN clause, 3-7
where allowed, 3-6
explicit cursors, 5-6
expressions
Boolean, 2-47
how evaluated, 2-42
parentheses in, 2-43
syntax, 11-67
EXTEND collection method, 4-24
extensibility, 7-3
external references, 7-31
how resolved, 7-32
external routines, 7-44

F

FALSE value, 2-9
FETCH statement, 5-9, 5-23
syntax, 11-77
fetching
across commits, 5-50
bulk, 4-38
Fibonacci sequence, 7-39
fields, 4-42
file I/O, 8-18
FIRST collection method, 4-23
flag, PLSQL_V2_COMPATIBILITY, 5-69
FLOAT subtype, 2-14
FOR loops, 3-10
cursor, 5-13
dynamic range, 3-12
iteration scheme, 3-10
loop counter, 3-10
nested, 3-14
FOR UPDATE clause, 5-8
restriction on, 5-19
when to use, 5-48
FORALL statement, 4-32
syntax, 11-82
using with BULK COLLECT clause, 4-41
formal parameters, 5-8
format
of functions, 7-6
of packaged subprograms, 7-11
of procedures, 7-3
format masks
when needed, 2-29
forward declarations, 7-10
when needed, 7-10, 7-42
forward references, 2-36
forward type definitions, 9-29
%FOUND cursor attribute, 5-35, 5-39
functions, 7-1, 7-6
body, 7-7
built-in, 2-52
call, 7-7
parameter, 7-6
parts, 7-7
RETURN clause, 7-7
specification, 7-7
syntax, 11-84

G

gigabyte, 2-22
GOTO statement, 3-15
label, 3-15
misuse, 3-17
restriction, 6-17
syntax, 11-89
GROUP BY clause, 5-3
GROUPING aggregate function, 5-3
guess, 2-18

H

handlers, exception, 6-2
handling exceptions, 6-1
raised in declaration, 6-16
raised in handler, 6-17
using OTHERS handler, 6-15
handling of nulls, 2-49
hidden declarations, 8-3
hint, DETERMINISTIC, 7-6
hint, NOCOPY, 7-17
host arrays
bulk binds, 4-41
hypertext markup language (HTML), 8-18
hypertext transfer protocol (HTTP), 8-18

I

identifiers
forming, 2-5
maximum length, 2-5
quoted, 2-6
scope rules, 2-38
IF statement, 3-2
ELSE clause, 3-3
ELSIF clause, 3-4
syntax, 11-91
THEN clause, 3-3
implicit cursors, 5-11
attributes, 5-39
implicit datatype conversion, 2-28
effect on performance, 5-68
implicit declarations
cursor FOR loop record, 5-13
FOR loop counter, 3-13
IN comparison operator, 2-47, 5-6
IN OUT parameter mode, 7-16
IN parameter mode, 7-14
incomplete object types, 9-29
index-by tables
versus nested tables, 4-3
infinite loops, 3-6
information hiding, 1-15, 8-5
initialization
collection, 4-8
object, 9-23
package, 8-8
record, 4-44
using DEFAULT, 2-31
variable, 2-41
when required, 2-32
INSERT statement
RETURNING clause, 5-64
syntax, 11-94
instances, 9-4
INT subtype, 2-14
INTEGER subtype, 2-14
inter-language calls, 7-44
INTERSECT set operator, 5-6
INTO clause, 5-23
INTO list, 5-9
INVALID_CURSOR exception, 6-5
INVALID_NUMBER exception, 6-5
invoker rights, 7-29
advantages, 7-30
versus definer rights, 7-29
IS DANGLING predicate, 9-33
IS NULL comparison operator, 2-46, 5-6
%ISOPEN cursor attribute, 5-35, 5-39
iteration
scheme, 3-10
versus recursion, 7-43
iterative control, 3-6

J

joins, 7-41

L

labels
block, 2-40
GOTO statement, 3-15
loop, 3-8
large object (LOB) datatypes, 2-22
LAST collection method, 4-23
LEVEL pseudocolumn, 5-4
lexical units, 2-2
LIKE comparison operator, 2-46, 5-6
LIMIT clause, 4-39
LIMIT collection method, 4-22
limitations, PL/SQL, E-1
literals, 2-7
Boolean, 2-9
character, 2-8
numeric, 2-7
string, 2-9
syntax, 11-97
LOB (large object) datatypes, 2-22
lob locators, 2-22
local subprograms, 1-18
locator variables, 6-22
LOCK TABLE statement, 5-49
syntax, 11-100
locks, 5-42
modes, 5-42
overriding, 5-48
using FOR UPDATE clause, 5-48
logical rowids, 2-17
LOGIN_DENIED exception, 6-5
LONG datatype, 2-16
maximum length, 2-16
restrictions, 2-16
LONG RAW datatype, 2-16
converting, 2-30
maximum length, 2-16
LOOP statement, 3-6
forms, 3-6
syntax, 11-102
loops
counters, 3-10
kinds, 3-6
labels, 3-8

M

maintainability, 7-3
map methods, 9-10
MAX aggregate function, 5-3
maximum precision, 2-13
maximum size
CHAR value, 2-15
identifier, 2-5
LOB, 2-22
LONG RAW value, 2-16
LONG value, 2-16
NCHAR value, 2-20
NVARCHAR2 value, 2-21
Oracle error message, 6-18
RAW value, 2-16
VARCHAR2 value, 2-19
membership test, 2-47
method calls, chaining, 9-26
methods
collection, 4-21
COUNT, 4-22
DELETE, 4-26, 11-20
EXISTS, 4-22
EXTEND, 4-24
FIRST, 4-23
LAST, 4-23
LIMIT, 4-22
map, 9-10
NEXT, 4-23
object, 9-3, 9-8
order, 9-10
PRIOR, 4-23
TRIM, 4-25
MIN aggregate function, 5-3
MINUS set operator, 5-6
mixed notation, 7-13
modes, parameter
IN, 7-14
IN OUT, 7-16
OUT, 7-14
modularity, 1-11, 7-3, 8-5
multi-line comments, 2-10
mutual recursion, 7-42

N

name resolution, 2-37, D-1
named notation, 7-13
names
cursor, 5-7
qualified, 2-36
savepoint, 5-45
variable, 2-37
naming conventions, 2-36
national character datatypes, 2-20
national character set, 2-20
National Language Support (NLS), 2-20
native dynamic SQL. See dynamic SQL
NATURAL subtype, 2-13
NATURALN subtype, 2-13
NCHAR datatype, 2-20
NCLOB datatype, 2-23
nested tables
manipulating, 4-13
versus index-by tables, 4-3
nesting
block, 1-3
FOR loop, 3-14
object, 9-7
record, 4-43
network traffic
reducing, 1-22
NEXT collection method, 4-23
NEXTVAL pseudocolumn, 5-3
nibble, 2-30
NLS (National Language Support), 2-20
NO_DATA_FOUND exception, 6-5
NOCOPY compiler hint, 7-17
restrictions on, 7-19
non-blank-padding semantics, B-3
NOT logical operator
treatment of nulls, 2-50
NOT NULL constraint
effect on %TYPE declaration, 2-33
effect on performance, 5-67
restriction, 5-7, 7-4
using in collection declaration, 4-6
using in field declaration, 4-44
using in variable declaration, 2-32
NOT_LOGGED_ON exception, 6-5
notation
mixed, 7-13
positional versus named, 7-13
%NOTFOUND cursor attribute, 5-36
NOWAIT parameter, 5-48
NVARCHAR2 datatype, 2-21
NVL function
treatment of nulls, 2-51
null handling, 2-49
in dynamic SQL, 10-13
NULL statement, 3-19
syntax, 11-109
using in a procedure, 7-4
nullity, 2-46
NUMBER datatype, 2-13
numeric literals, 2-7
NUMERIC subtype, 2-14

O

object attributes, 9-3, 9-7
accessing, 9-24
allowed datatypes, 9-7
maximum number, 9-7
object constructors
calling, 9-25
passing parameters to, 9-26
object methods, 9-3, 9-8
calling, 9-26
object tables, 9-30
object types, 9-1, 9-3
advantages, 9-5
defining, 9-12
examples, 9-12
structure, 9-5
syntax, 11-110
object-oriented programming, 9-1
objects, 9-4
declaring, 9-22
initializing, 9-23
manipulating, 9-30
sharing, 9-27
OPEN statement, 5-8
syntax, 11-119
OPEN-FOR statement, 5-19
syntax, 11-121
OPEN-FOR-USING statement, 10-7
syntax, 11-124
operators
comparison, 2-45
precedence, 2-43
relational, 2-46
option, PARALLEL_ENABLE, 7-6
OR keyword, 6-16
order methods, 9-10
order of evaluation, 2-43, 2-44
OTHERS exception handler, 6-2, 6-15
OUT parameter mode, 7-14
overloading, 7-24
object method, 9-10
packaged subprogram, 8-15
restrictions, 7-25
using subtypes, 7-26

P

packaged cursors, 5-12
packaged subprograms, 1-18, 7-11
calling, 8-7
overloading, 8-15
packages, 8-1, 8-2
advantages, 8-5
bodiless, 8-6
body, 8-2
initializing, 8-8
private versus public objects, 8-15
product-specific, 8-17
referencing, 8-7
scope, 8-6
serially reusable, 5-65
specification, 8-2
syntax, 11-127
PARALLEL_ENABLE option, 7-6
parameter aliasing, 7-22
parameter passing
by reference, 7-22
by value, 7-22
in dynamic SQL, 10-6
parameters
actual versus formal, 7-12
cursor, 5-8
default values, 7-20
modes, 7-14
SELF, 9-9
parentheses, 2-43
pattern matching, 2-46
performance, 1-21
improving, 5-61
physical rowids, 2-17
pipe, 8-18
placeholders, 10-2
duplicate, 10-12
PLS_INTEGER datatype, 2-14
PL/SQL
advantages, 1-20
architecture, 1-17
block structure, 1-2
execution environments, 1-17
limitations, E-1
performance, 1-21
portability, 1-23
procedural aspects, 1-2
reserved words, F-1
sample programs, A-1
Server Pages (PSPs), 7-45
support for SQL, 1-20
syntax, 11-1
PL/SQL blocks
anonymous, 1-2, 7-2
syntax, 11-10
PL/SQL compiler
how calls are resolved, 7-27
PL/SQL engine, 1-17
in Oracle server, 1-18
in Oracle tools, 1-19
PLSQL_V2_COMPATIBILITY flag, 5-69
pointers, 5-16
portability, 1-23
positional notation, 7-13
POSITIVE subtype, 2-13
POSITIVEN subtype, 2-13
pragmas, 6-8
AUTONOMOUS_TRANSACTION, 5-53
EXCEPTION_INIT, 6-8
RESTRICT_REFERENCES, 5-60, 7-9, 10-15
SERIALLY_REUSABLE, 5-65
precedence, operator, 2-43
precision of digits
specifying, 2-13
predefined exceptions
list of, 6-4
raising explicitly, 6-11
redeclaring, 6-10
predicates, 5-5
PRIOR collection method, 4-23
PRIOR row operator, 5-4, 5-6
private objects, 8-15
procedural abstraction, 9-2
procedures, 7-1, 7-3
body, 7-4
calling, 7-5
parameter, 7-3
parts, 7-4
specification, 7-4
syntax, 11-133
productivity, 1-22
program units, 1-11
PROGRAM_ERROR exception, 6-5
propagation, exception, 6-12
pseudocolumns, 5-3
CURRVAL, 5-3
LEVEL, 5-4
NEXTVAL, 5-3
ROWID, 5-4
ROWNUM, 5-5
pseudoinstruction, 6-8
public objects, 8-15
purity rules, 7-9

Q

qualifiers
using subprogram names as, 2-38
when needed, 2-36, 2-40
query work areas, 5-16
quoted identifiers, 2-6

R

RAISE statement, 6-11
syntax, 11-138
using in exception handler, 6-15
raise_application_error procedure, 6-9
raising an exception, 6-11
range operator, 3-10
RAW datatype, 2-16
converting, 2-30
maximum length, 2-16
read consistency, 5-42
READ ONLY parameter, 5-47
readability, 2-2, 3-19
read-only transaction, 5-47
REAL subtype, 2-14
RECORD datatype, 4-42
records, 4-42
%ROWTYPE, 5-13
assigning, 4-47
comparing, 4-49
declaring, 4-43
defining, 4-42
implicit declaration, 5-13
initializing, 4-44
manipulating, 4-49
nesting, 4-43
referencing, 4-45
syntax, 11-140
recursion, 7-39
infinite, 7-39
mutual, 7-42
terminating condition, 7-39
versus iteration, 7-43
REF CURSOR datatype, 5-16
defining, 5-17
REF function, 9-32
REF type modifier, 9-28
reference datatypes, 2-11
references, external, 7-31
refs, 9-27
dangling, 9-33
declaring, 9-28
dereferencing, 9-33
relational operators, 2-46
remote access indicator, 2-36
REPEAT UNTIL structure
mimicking, 3-10
REPLACE function
treatment of nulls, 2-52
reraising an exception, 6-14
reserved words, F-1
misuse of, 2-6
using as quoted identifier, 2-7
resolution, name, 2-37, D-1
RESTRICT_REFERENCES pragma, 7-9
syntax, 11-144
using with autonomous functions, 5-60
using with dynamic SQL, 10-15
restricted rowids, 2-17
result set, 1-5, 5-8
RETURN clause
cursor, 5-12
function, 7-7
RETURN statement, 7-8
syntax, 11-147
return type, 5-17, 7-26
return value, function, 7-7
RETURNING clause, 5-64, 9-36
reusability, 7-3
reusable packages, 5-65
REVERSE reserved word, 3-11
rollback segments, 5-42
ROLLBACK statement, 5-44
effect on savepoints, 5-45
syntax, 11-149
rollbacks
implicit, 5-46
of FORALL statement, 4-33
statement-level, 5-44
routines, external, 7-44
row locks, 5-48
row operators, 5-6
%ROWCOUNT cursor attribute, 5-36, 5-40
ROWID datatype, 2-17
ROWID pseudocolumn, 5-4
rowids, 2-17
extended, 2-17
guess, 2-18
logical, 2-17
physical, 2-17
restricted, 2-17
universal, 2-17
ROWIDTOCHAR function, 5-4
ROWNUM pseudocolumn, 5-5
%ROWTYPE attribute, 2-33
syntax, 11-151
ROWTYPE_MISMATCH exception, 6-6
RPC (remote procedure call), 6-12
RTRIM function
using to insert data, B-4
rules, purity, 7-9
run-time errors, 6-1

S

sample database tables
DEPT table, xxi
EMP table, xxi
sample programs, A-1
savepoint names
reusing, 5-45
SAVEPOINT statement, 5-45
syntax, 11-153
scalar datatypes, 2-11
scale
specifying, 2-14
schemes, iteration, 3-10
scientific notation, 2-8
scope, 2-38
collection, 4-8
cursor, 5-7
cursor parameter, 5-7
definition, 2-38
exception, 6-7
identifier, 2-38
loop counter, 3-13
package, 8-6
SELECT INTO statement
syntax, 11-154
selector, 5-21
SELF parameter, 9-9
semantics
assignment, B-2
blank-padding, B-3
CHAR versus VARCHAR2, B-1
non-blank-padding, B-3
string comparison, B-2
separators, 2-3
sequence, 5-3
sequential control, 3-15
serially reusable packages, 5-65
SERIALLY_REUSABLE pragma, 5-65
syntax, 11-159
Server Pages, PL/SQL, 7-45
session, 5-41
session-specific variables, 8-11
set operators, 5-6
SET TRANSACTION statement, 5-47
syntax, 11-161
short-circuit evaluation, 2-45
side effects, 7-14
controlling, 7-9
significant characters, 2-5
SIGNTYPE subtype, 2-13
simple symbols, 2-3
single-line comments, 2-10
size limit, varray, 4-5
SMALLINT subtype, 2-14
snapshots, 5-42
SOME comparison operator, 5-5
spaces
where allowed, 2-2
spaghetti code, 3-15
sparse collections, 4-3
specification
call, 8-3
cursor, 5-12
function, 7-7
method, 9-8
object, 9-5
package, 8-6
procedure, 7-4
SQL
comparison operators, 5-5
data manipulation statements, 5-2
dynamic, 10-2
pseudocolumns, 5-3
row operators, 5-6
set operators, 5-6
support in PL/SQL, 1-20
SQL cursor
syntax, 11-163
SQLCODE function, 6-18
syntax, 11-166
SQLERRM function, 6-18
syntax, 11-168
stack, 9-13
standalone subprograms, 1-18
START WITH clause, 5-4
statement terminator, 11-15
statement-level rollbacks, 5-44
statements, PL/SQL
assignment, 11-3
CLOSE, 5-11, 5-24, 11-17
COMMIT, 11-31
DELETE, 11-52
dynamic SQL, 10-2
EXECUTE IMMEDIATE, 10-3
EXIT, 11-65
FETCH, 5-9, 5-23, 11-77
FORALL, 4-32
GOTO, 11-89
IF, 11-91
INSERT, 11-94
LOCK TABLE, 11-100
LOOP, 11-102
NULL, 11-109
OPEN, 5-8, 11-119
OPEN-FOR, 5-19, 11-121
OPEN-FOR-USING, 10-7
RAISE, 11-138
RETURN, 11-147
ROLLBACK, 11-149
SAVEPOINT, 11-153
SELECT INTO, 11-154
SET TRANSACTION, 11-161
UPDATE, 11-172
STDDEV aggregate function, 5-3
STEP clause
mimicking, 3-12
stepwise refinement, 1-2
STORAGE_ERROR exception, 6-6
when raised, 7-39
store tables, 4-4
stored subprograms, 1-18
string comparison semantics, B-2
string literals, 2-9
STRING subtype, 2-19
structure theorem, 3-2
stubs, 3-19, 7-3
subprograms, 7-2
advantages, 7-3
declaring, 7-10
how calls are resolved, 7-27
local, 1-18
overloading, 7-24
packaged, 1-18, 7-11
parts, 7-2
procedure versus function, 7-6
recursive, 7-39
standalone, 1-18
stored, 1-18
subquery, 5-11
SUBSCRIPT_BEYOND_COUNT exception, 6-6
SUBSCRIPT_OUTSIDE_LIMIT exception, 6-6
SUBSTR function, 6-19
subtypes, 2-13, 2-25
CHARACTER, 2-15
compatibility, 2-26
constrained versus unconstrained, 2-25
DEC, 2-14
DECIMAL, 2-14
defining, 2-25
DOUBLE PRECISION, 2-14
FLOAT, 2-14
INT, 2-14
INTEGER, 2-14
NATURAL, 2-13
NATURALN, 2-13
NUMERIC, 2-14
overloading, 7-26
POSITIVE, 2-13
POSITIVEN, 2-13
REAL, 2-14
SIGNTYPE, 2-13
SMALLINT, 2-14
STRING, 2-19
VARCHAR, 2-19
SUM aggregate function, 5-3
support for SQL, 5-2
symbols
compound, 2-4
simple, 2-3
syntax
definition, 11-1
diagram reading, 11-2

T

TABLE datatype, 4-2
TABLE operator, 4-18
tabs, 2-2
terminating condition, 7-39
terminator, statement, 2-3
ternary operators, 2-42
THEN clause, 3-3
TIMEOUT_ON_RESOURCE exception, 6-6
TOO_MANY_ROWS exception, 6-6
top-down design, 1-15
trailing blanks
how handled, B-4
transactions, 5-2
autonomous, 5-52
committing, 5-43
context, 5-55
distributed, 5-42
ending properly, 5-46
processing, 5-2, 5-41
read-only, 5-47
rolling back, 5-44
visibility, 5-55
triggers, 1-19
autonomous, 5-58
TRIM collection method, 4-25
TRUE value, 2-9
%TYPE attribute, 2-32
syntax, 11-170
type definitions
collection, 4-5
forward, 9-29
RECORD, 4-42
REF CURSOR, 5-17

U

unary operators, 2-42
underscores, 2-5
unhandled exceptions, 6-12, 6-19
uninitialized object
how treated, 9-24
UNION ALL set operator, 5-6
UNION set operator, 5-6
universal rowids, 2-17
UPDATE statement
RETURNING clause, 5-64
syntax, 11-172
URL (uniform resource locator), 8-18
UROWID datatype, 2-17
user session, 5-41
user-defined exceptions, 6-7
user-defined records, 4-42
user-defined subtypes, 2-25
USING clause, 10-3, 11-62
UTL_FILE package, 8-18
UTL_HTTP package, 8-18

V

VALUE function, 9-31
VALUE_ERROR exception, 6-6
VARCHAR subtype, 2-19
VARCHAR2
datatype, 2-19
semantics, B-1
variables
assigning values, 2-41
declaring, 2-30
initializing, 2-41
session-specific, 8-11
syntax, 11-33
VARIANCE aggregate function, 5-3
VARRAY datatype, 4-4
varrays
size limit, 4-5
visibility
of package contents, 8-3
transaction, 5-55
versus scope, 2-38

W

WHEN clause, 3-7, 6-15
WHILE loop, 3-9
wildcards, 2-46
words, reserved, F-1
work areas, query, 5-16
Wrap Utility, C-1
input and output files, C-3
running, C-2

Z

ZERO_DIVIDE exception, 6-6

Go to previous page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents