Non-ASCII characters in identifiers
HCL OneDB™ database servers support non-ASCII (wide, 8-bit, and multibyte) characters from the code set of the database locale in most SQL identifiers, such as the names of columns, connections, constraints, databases, indexes, roles, SPL routines, sequences, synonyms, tables, triggers, and views.
On HCL
OneDB, you
can use non-ASCII characters (8-bit and multibyte characters) when
you create or refer to any of these database server names:
- Chunk name
- Message-log file name
- Path name
The following restrictions affect the ability of the database
server to generate file names that contain non-ASCII characters:
- The database server must know whether the operating system is 8-bit clean.
- The code set specified by the DB_LOCALE setting must support these non-ASCII characters.
In a database with a nondefault locale, whose code set supports multibyte (or other non-ASCII) characters, you can use those non-ASCII characters when you declare most SQL identifiers, as listed in the following table.
In the following table, the Type
of identifier column lists various categories of objects that
can have SQL identifiers or operating-system identifiers. The SQL
segment column shows the segment that provides the syntax of the
identifier in the HCL OneDB Guide to SQL:
Syntax. The Example
context column lists an SQL statement that can declare or can
reference the identifier.
Type of identifier | SQL segment | Example context |
---|---|---|
Alias | Identifier | SELECT |
Cast | Expression | CREATE CAST |
Column name | Identifier | CREATE TABLE |
Connection name | Quoted String | CONNECT (For more information, see Specify quoted strings.) |
Constraint name | Database Object Name | CREATE TABLE |
Cursor name | Identifier | DECLARE (For more information, see Handle non-ASCII characters.) |
Database name | Database Object Name | CREATE DATABASE |
Distinct data type name | Identifier, Data Type | CREATE DISTINCT |
File name | None | LOAD |
Function name | Database Object Name | CREATE FUNCTION |
Host variable | None | FETCH (For more information, see Handle non-ASCII characters.) |
Index name | Database Object Name | CREATE INDEX |
Opaque data type name | Identifier, Data Type | CREATE OPAQUE TYPE |
Operator-class name | Database Object Name | CREATE OPCLASS |
Partition | Identifier | ALTER FRAGMENT |
Routine name | Database Object Name | CREATE FUNCTION |
Routine name | Database Object Name | CREATE PROCEDURE |
Role name | Identifier | CREATE ROLE |
Row data type | Identifier | CREATE ROW TYPE |
Sequence name | Database Object Name | CREATE SEQUENCE |
SQL Statement identifier | Identifier | PREPARE (For more information, see Handle non-ASCII characters.) |
SPL routine name | Database Object Name | CREATE PROCEDURE |
SPL routine variables | None (language-specific) | CREATE PROCEDURE FROM |
Synonym | Database Object Name | CREATE SYNONYM |
Table name | Database Object Name | CREATE TABLE |
Trigger correlation name | Database Object Name | CREATE TRIGGER |
Trigger name | Database Object Name | CREATE TRIGGER |
View name | Database Object Name | CREATE VIEW |