A Netezza SQL identifier is the name of a Netezza database object such as a table, column, user, group, user-defined object, and database names. Netezza supports the SQL 1999 definition for naming identifiers, and they can be up to 128 bytes in length.
Read:
- Netezza SQL command and its usage
- Netezza Create user command and its Usage
- IBM Netezza Alter user command and its Usage
- Netezza Create, Drop, Rename Database Commands and Examples
Netezza SQL Identifiers
There are two types of Netezza SQL identifiers: regular and delimited.
Netezza SQL Regular Identifiers
A Netezza SQL regular identifier is not case sensitive. You can refer to it using any case combination of letters. For instance, if you create the database TRAINING, then you can refer it as Training, or Training etc.
Netezza supports the SQL 1999 and ANSI SQL specifies that system should convert all regular SQL identifiers to the corresponding upper-case characters, Netezza system also converts any Netezza SQL regular identifier you specify to upper space when the regular identifiers are used in query processing.
Allowed characters: Letters, syllables, ideographs, decimal digits, underscores, and dollar sign ($). Name should start with letters. SQL reserved keywords are not allowed as the names.
Example:
SELECT Col1 FROM Training_table WHERE Col2 LIKE 'AB%';
Netezza SQL Delimited Identifiers
A delimited identifier is also a name of a database object, but it is enclosed in double-quotation marks and has special considerations. A delimited identifier is case-sensitive, so a database named “Training” is not the same database as one named TRAINING.
The Netezza system does not convert delimited identifiers to the default system case, nor does it save the enclosing double-quotation marks in the database.
Allowed characters: Within the double quotation marks, a delimited identifier can include the same letters, syllables, ideographs, decimal digits, and underscores as a regular identifier, but it can also
Include spaces, special characters such as hyphens and percent signs, and SQL reserved keywords. With the exception of underscores, which are not allowed, a delimited identifier can begin with any of these letters, digits, or symbols.
Example:
SELECT "Col1 Field" FROM "Training Table" WHERE "Col2 Field" LIKE 'AB%';