Characters

The basic symbols of keywords and operators in the SQL language are single-byte characters12 that are part of all character sets supported by the IBM® relational database products. Characters of the language are classified as letters, digits, or special characters.

A letter is any of the 26 uppercase (A through Z) and 26 lowercase (a through z) letters of the English alphabet. 13

A digit is any of the characters 0 through 9.

A special character is any of the characters listed below:

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 bar15 ^ caret
! exclamation mark14 [ left bracket
{ left brace ] right bracket
} right brace ¬ not 14

12.
Note that if the SQL statement is encoded as Unicode data, all characters of the statement except for string constants will be converted to single-byte characters prior to processing. Tokens representing string constants may be processed as UTF-16 graphic strings without conversion to single-byte.
13.
Letters also include three code points reserved as alphabetic extenders for national languages (#, @, and $ in the United States). These three code points should be avoided because they represent different characters depending on the CCSID.
15.
Using the vertical bar (|) character might inhibit code portability between IBM relational database products. It is preferable to use the CONCAT operator instead of the concatenation operator (||). Use of the vertical bar should be avoided because it is a variant character.
14.
Using the not symbol (¬) and the exclamation point symbol (!) might inhibit code portability between IBM relational database products. Avoid using them because they are variant characters. Instead of ¬= or != use <>. Instead of ¬> or !> use <=. Instead of ¬< or !< use >=.



[ Top of Page | Previous Page | Next Page | Contents | Index ]