The PL/SQL Character Set
A PL/SQL program consists of a sequence of statements, each of which is made up of one or more lines of text. Text is made up of combinations of the characters shown in Table.
Type | Characters |
---|---|
Letters | A-Z, a-z |
Digits | 0-9 |
Symbols | ~ ! @ # $ % & * ( ) _ - + = | [ ] { } : ; " ' < > , . ? / |
Whitespace | Tab, space, carriage return |
Note that PL/SQL is a case-insensitive language. Uppercase letters are treated the same way as lowercase letters except when the characters are surrounded by single quotes (when they are literal strings) or represent the value of a character variable.
Every valid statement in PL/SQL, from declaration to executable statement to keyword, is made up of various combinations of the above characters. Now you just have to figure out how to put them all together!
A number of these characters -- both singly and in combination with other characters -- have a special significance in PL/SQL. Table 2 lists these special symbols.
Symbol | Description |
---|---|
; | |
% | |
_ | |
: | |
** | |
< > and != | |
|| | |
<< and >> | |
<= and >= | |
:= | |
=> | |
-- | |
/* and */ |
Characters are grouped together into lexical units, also called atomics of the language, because they are the smallest individual components. A lexical unit in PL/SQL is any of the following:
- Identifier
- Literal
- Delimiter
- Comment