Skip to Main Content
Oracle PL/SQL Language Pocket Reference, 4th Edition
book

Oracle PL/SQL Language Pocket Reference, 4th Edition

by Steven Feuerstein, Bill Pribyl, Chip Dawes
October 2007
Intermediate to advanced content levelIntermediate to advanced
178 pages
2h 50m
English
O'Reilly Media, Inc.
Content preview from Oracle PL/SQL Language Pocket Reference, 4th Edition

PL/SQL Language Fundamentals

This section summarizes the fundamental components of the PL/SQL language: characters, identifiers, literals, delimiters, use of comments and pragmas, and construction of statements and blocks.

PL/SQL Character Set

The PL/SQL language is constructed from letters, digits, symbols, and whitespace, as defined in the following table:

Type

Characters

Letters

AZ, az

Digits

09

Symbols

˜!@#$%^&*( )_−+=|[ ]{ }:;"'< >,.?/ ^

Whitespace

space, tab, newline, carriage return

Characters are grouped together into four lexical units: identifiers, literals, delimiters, and comments.

Identifiers

Identifiers are names for PL/SQL objects such as constants, variables, exceptions, procedures, cursors, and reserved words. Identifiers have the following characteristics:

  • Can be up to 30 characters in length

  • Cannot include whitespace (space, tab, carriage return)

  • Must start with a letter

  • Can include a dollar sign ($), an underscore (_ ), and a pound sign (#)

  • Are not case-sensitive

Using PL/SQL’s reserved words as identifiers in your programs is not a good idea and can result in compilation or runtime errors that are difficult to troubleshoot.

Tip

Earlier editions of this book included a list of reserved words. However, Oracle Database 11g Release 1 has more than 1600 reserved words as listed in the V$RESERVED_WORDS data dictionary view. In our testing we determined that more than 650 of these could not be used as procedure names or variable names. Consult V$RESERVED_WORDS for the full list of unsupported ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle PL/SQL Language Pocket Reference, 5th Edition

Oracle PL/SQL Language Pocket Reference, 5th Edition

Steven Feuerstein, Bill Pribyl, Chip Dawes

Publisher Resources

ISBN: 9780596514044Errata Page