The following table lists the characters that can be used in SQL statements.
Table 1-1 SQL character set
Type | Permissible characters in SQL |
---|---|
Character string literal | One-byte character codes (not including X'00') |
National character string literal | All two-byte code characters |
Mixed character string literal | One-byte character codes (not including X'00') and all two-byte code characters |
Other than above |
|
Other than above | Question mark (?) Colon (:) Semicolon (;) Percent sign (%) Vertical bar (|) Left square bracket ([) Right square bracket (]) TAB (X'09') NL (X'0a') CR (X'0d') |
Characters that can be used in SQL vary depending on the character code type specified in the pdsetup command. For details about the pdsetup command, see the manual HiRDB Version 9 Command Reference.
SQL allows the use of one-byte and two-byte characters. These two types of characters require different character codes (two-byte characters are not available among the single-byte character codes). The following table indicates the relationships between characters and the character code types:
Specified character code | Single-byte character | Double-byte character | Remarks | |
---|---|---|---|---|
Multiple -byte character code | sjis#3 (Shift JIS kanji) | JISX0201 | JISX0208 | Double-byte characters include gaiji characters. |
ujis#2 (EUC Japanese kanji) | JISX0201 | JISX0208 | Double-byte characters do not include gaiji characters.#1 | |
chinese#6 (EUC Chinese kanji) | ISO-8859-1 (other than 80 to FF) | GB2312-80 | Double-byte characters do not include gaiji characters#1 | |
utf-8#3, #4 (Unicode (UTF-8)) | JISX0221 | JISX0221 | Double-byte characters include gaiji characters. For characters in the ASCII code range, these characters are treated the same as other characters, except that in some cases a single character is represented in six bytes.#5 | |
MS-Unicode | MS-Unicode | |||
chinese-gb18030#6 (Chinese kanji GB18030) | ISO-8859-1 (other than 80 to FF) | GB18030-2000 | Double-byte characters include gaiji characters. For characters in the ASCII code range, these characters are treated the same as other characters, except that in some cases a single character is represented in four bytes. | |
Single-byte character code | lang-c#2, #6 (8-bit code) | Same as the specified code | -- | These codes can be used in US ASCII and 8-bit codes. |