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.
The PL/SQL language is constructed from letters, digits, symbols, and whitespace, as defined in the following table:
space, tab, newline, carriage return
Characters are grouped together into four lexical units: identifiers, literals, delimiters, and comments.
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.
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 ...