Delimited identifiers
Identifiers are used in SQL to identify names of tables, columns, or other database objects, depending on the command they are used in.
Delimited identifier, or quoted identifier, is formed by enclosing an arbitrary
sequence of characters in double-quotes ("
). A delimited identifier is always
an identifier, never a key word. So, "select"
could be used to refer to a
column or table named "select", whereas an unquoted select
would be taken
as a key word and would therefore provoke a parse error when used where a table
or column name is expected.
Regular unquoted SQL identifiers and key words must begin with a letter
(a-z
,A-Z
) or an underscore (_
). Quoted identifiers can contain any
character, except the character with code zero; the standard way to include a
double quote is to write two double quotes. This allows constructing table or
column names that would otherwise not be possible, such as ones containing
spaces or ampersands.
In Raijin, quoted identifiers are also used in the |
Raijin supports an extended syntax for delimited identifiers and single-quoted
string constants. The extended syntax allows using the backslash (C-style)
escape sequences within the identifier or string constant. So, it is possible to
use special symbols in names (for example, the new line \n
, Unicode symbols,
etc.); the details are in the Backslash (C-style) escaping section.