SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-52
Identifiers
Identifiers
SQL/MP Considerations for Identifiers
Examples of 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 at sign
(@), the forward slash (/), backward slash (\), and circumflex (^). To include a double
quote character in a delimited identifier, use two consecutive double quotes (for
example, "da Vinci’s ""Mona Lisa""").
Unlike regular identifiers, delimited identifiers are case-sensitive. Spaces within a
delimited identifier are significant except for trailing spaces, which NonStop SQL/MX
truncates. You can use reserved words as delimited identifiers.
These forms of delimited identifiers are not supported. Results are unpredictable for
delimited identifiers that:
Start with a “\” or “$”
Consist of space characters only (for example, " ", " ")
Consist of special characters only (for example, "~" or "~!#$%^&")
Contain more than two consecutive double quote characters (for example,
""""""""""abc"""""""""")
Contain dots (for example, "cat.sch".sch2."cat3.sch3.mod")
Cause a length limit (128) overflow (for example, 250 double quotes will result in
character length of 125 bytes)
Specifying Delimited Identifiers in OSS Command-Line
Arguments
Occasionally, you might want to use SQL reserved words such as TIME and ZONE as
identifiers to name some of your SQL objects. SQL provides delimited identifiers
specifically for these situations. Suppose you have chosen the name TIME for one of