Neoview SQL Reference Manual (R2.4)

Identifiers
SQL identifiers are names used to identify tables, views, columns, and other SQL entities. The
two types of identifiers are regular and delimited. A delimited identifier is enclosed in double
quotes ("). An identifier of either type can contain up to 128 characters.
Regular Identifiers
Regular identifiers begin with a letter (A through Z or a through z), but can also contain digits
(0 through 9), or underscore characters (_). Regular identifiers are not case-sensitive. You cannot
use a reserved word as a regular identifier.
Delimited Identifiers
Delimited identifiers are character strings that appear within double quote characters (") and
consist of alphanumeric characters and other characters except for the leading at sign (@) and
the forward slash (/) character. To include a double quote character in a delimited identifier,
use two consecutive double quotes (for example, "da Vincis ""Mona Lisa""").
Unlike regular identifiers, delimited identifiers are case-sensitive. Spaces within a delimited
identifier are significant except for trailing spaces, which Neoview SQL truncates. You can use
reserved words as delimited identifiers.
Limitations for Delimited Identifiers
These limitations apply to delimited identifiers:
Must start and end with a double quote.
Must not use one of these characters: leading at sign (@) and the forward slash (/) character.
Internal double quotes must be doubled
Identifiers with @ character prefix are reserved for internal names.
The circumflex character ^ cannot be the first character following the starting double quote.
Cannot contain trailing spaces before the end double quote
Must contain at least one non blank character.
Cannot be all special characters (for example, “-” or “~!#$%^&”.
Can cause a length limit (128) overflow. For example, the metadata–format length of the
name “a_funny”“name” is within the limit; the metatdata–format name, that is, the format
stored in the metadata tables, is a_funny”name and its length is 12, not 15.
Examples of Identifiers
These are regular identifiers:
mytable
SALES2006
Employee_Benefits_Selections
CUSTOMER_BILLING_INFORMATION
Because regular identifiers are case insensitive, Neoview SQL treats all these identifiers as
alternative representations of mytable:
mytable MYTABLE MyTable mYtAbLe
These are delimited identifiers:
"mytable"
"table"
"2006 SALES"
"CUSTOMER-BILLING-INFORMATION"
Because delimited identifiers are case-sensitive, Neoview SQL treats the identifier "mytable"
as different from the identifiers "MYTABLE" or "MyTable". Trailing spaces in a delimited
identifier are truncated. For example, "mytable " is equivalent to "mytable".
252 SQL Language Elements