IBM Books

SQL Reference

SQL Identifiers

There are two types of SQL identifiers: ordinary identifiers and delimited identifiers.

Example: 

    WKLYSAL    WKLY_SAL    "WKLY_SAL"    "WKLY SAL"    "UNION"    "wkly_sal"

SQL identifiers are also classified according to their maximum length. A long identifier has a maximum length of 18 bytes. A short identifier has a maximum length of 8 bytes. These limits do not include the quotation marks surrounding the delimited identifier.

Character conversions between identifiers created on a double-byte code page but used by an application or database on a multi-byte code page may require special consideration. After conversion to multi-byte, it is possible that such identifiers may exceed the length limit for an identifier (see Appendix O. Japanese and Traditional-Chinese EUC Considerations for details).

Host Identifiers

A host identifier is a name declared in the host program. The rules for forming a host identifier are the rules of the host language. A host identifier should not be greater than 30 characters and should not begin with 'SQL'.


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

[ DB2 List of Books | Search the DB2 Books ]