Any character data that is processed by procedural language (PL) or stored in the database must be represented in byte sequences. The byte representation of a single character is called a character code, while a set of character codes is called a character set.
OceanBase Database supports the database character set and the national character set. PL also supports these character sets.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Database character set
PL uses the database character set to represent the following information:
The stored source text of PL units.
The character values of the
CHAR,VARCHAR2,CLOB, andLONGtypes.
The database character set can be single-byte or multibyte-varying-width. The former can map each supported character to a specific byte, and the latter can map each supported character to a sequence of one, two, three, or four bytes. The maximum number of bytes in a character code depends on the particular character set.
Each database character set contains the following fundamental characters:
Latin letters: A to Z, and a to z
Decimal digits: 0 to 9
Punctuation marks: See the following table.
Whitespace characters: space, tab, line break, and carriage return
PL source text that uses only fundamental characters can be compiled and stored in any databases. PL source text that contains non-fundamental characters can be stored and compiled only in databases that support those characters.
The following table lists the punctuation marks in the database character set.
| Punctuation mark | Name |
|---|---|
| ( | Opening parenthesis |
| ) | Closing parenthesis |
| < | Opening angle bracket |
| > | Closing angle bracket |
| + | Plus sign |
| - | Hyphen or minus sign |
| * | Asterisk |
| / | Forward slash |
| = | Equal sign |
| , | Comma |
| ; | Semicolon |
| : | Colon |
| . | Period |
| ! | Exclamation point |
| ? | Question mark |
| ' | Apostrophe |
| " | Double quotation marks |
| @ | At sign |
| % | Percent sign (%) |
| # | Number sign |
| $ | Dollar sign |
| _ | Underscore (_) |
| | | Vertical bar |
National character set
PL uses the national character set to represent the character values of the NCHAR, NVARCHAR2, and NCLOB types.