The PL/SQL Character Set
A PL/SQL program consists of a sequence of statements, each made up of one or more lines of text. The precise characters available to you will depend on what database character set you’re using. For example, Table 3-2 illustrates the available characters in the US7ASCII character set.
Table 3-2. Characters available to PL/SQL in the US7ASCII character set
Type |
Characters |
---|---|
Letters |
A-Z, a-z |
Digits |
0-9 |
Symbols |
~ ! @ # $ % & * ( ) _ - + = | [ ] { } : ; " ' < > , . ? / ^ |
Whitespace |
Tab, space, newline, carriage return |
Every keyword in PL/SQL is made from various combinations of characters in this character set. Now you just have to figure out how to put them all together!
By default, PL/SQL is a case-insensitive language. That is, uppercase letters are treated the same way as lowercase letters except when characters are surrounded by single quotes, which makes them a literal string.
A number of these characters—both singly and in combination with other characters—have a special significance in PL/SQL. Table 3-3 lists these special symbols.
Table 3-3. Simple and compound symbols in PL/SQL
Symbol |
Description |
---|---|
; |
Semicolon: terminates declarations and statements |
% |
Percent sign: attribute indicator (cursor attributes like %ISOPEN and indirect declaration attributes like %ROWTYPE); also used as multibyte wildcard symbol with the LIKE condition |
_ |
Single underscore: single-character wildcard symbol in LIKE condition |
@ |
At- sign: remote ... |
Get Oracle PL/SQL Programming, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.