Characters
The basic symbols of keywords and operators in the SQL language are single-byte characters that are part of all IBM® character sets. Characters of the language are classified as letters, digits, or special characters.
A letter is any of the 26 uppercase (A through Z) or 26 lowercase (a through z) letters. Letters also include three code points reserved as alphabetic extenders for national languages (#, @, and $ in the United States). However these three code points should be avoided, especially for portable applications, because they represent different characters depending on the CCSID. Letters also include the alphabetics from the extended character sets. Extended character sets contain additional alphabetic characters; for example, those with diacritical marks (´ is an example of a diacritical mark). The available characters depend on the code page in use.
A digit is any of the characters 0 through 9.
A special character is any of the characters listed in the following table:
Character | Description | Character | Description |
---|---|---|---|
space or blank | - | minus sign | |
" | quotation mark or double quote or double quotation mark | . | period |
% | percent | / | slash |
& | ampersand | : | colon |
' | apostrophe or single quote or single quotation mark | ; | semicolon |
( | left parenthesis | < | less than |
) | right parenthesis | = | equals |
* | asterisk | > | greater than |
+ | plus sign | ? | question mark |
, | comma | _ | underline or underscore |
| | vertical bar1 | ^ | caret |
! | exclamation mark | [ | left bracket |
{ | left brace | ] | right bracket |
} | right brace | \ | reverse solidus or back slash2 |
1 Using the vertical bar (|) character might inhibit code portability between IBM relational products. Use the CONCAT operator in place of the || operator. 2 Some code pages do not have a code point for the reverse solidus (\) character. When entering Unicode string constants, the UESCAPE clause can be used to specify a Unicode escape character other than reverse solidus. |
All multi-byte characters are treated as letters, except for the double-byte blank, which is a special character.