Previous Topic: IdentifiersNext Topic: Delimited SQL identifiers


Ordinary SQL identifiers

An ordinary SQL identifier is a letter (the term "letter" includes the @, $, and #) that may be followed by zero or more characters. Each character is a letter (including @, $, #), digit, or the underscore character.

Ordinary SQL identifiers can include DBCS (Double-Byte Character Set) characters. The DBCS portions of the name must be delimited by the Shift-Out and Shift-In characters. The names are checked by SQL for paired shift characters. The maximum physical length of these names is the same as it was for prior versions of CA Datacom/DB. The Shift characters count in determining the length, and the DBCS characters take up two bytes each. Therefore you can get a maximum of 15 DBCS characters in a 32-byte identifier ((15 * 2) for the DBCS characters + 2 for the shift characters). DBCS blanks (X'4040') are not allowed in the DBCS portion of an identifier.

Note: Do not use a reserved word as an ordinary SQL identifier. See the list of reserved words on Reserved Words.