FirebirdSQL logo

Rules for Delimited Identifiers

  • Length cannot exceed 63 characters in character set UTF8 (252 bytes).Identifiers are stored in character set UTF8, which means characters outside the ASCII range are stored using 2 to 4 bytes.

  • The entire string must be enclosed in double-quotes, e.g. "anIdentifier"

  • A double-quote in an identifier can be escaped by doubling it, e.g. "with""doublequote";we recommend avoiding double-quotes in delimited identifiers.

  • It may contain any character from the UTF8 character set, including accented characters, spaces and special characters

  • An identifier can be a reserved word

  • Delimited identifiers are stored as-is and are case-sensitive in all contexts

  • Trailing spaces in delimited identifiers are removed, as with any string constant

  • Delimited identifiers are available in Dialect 3 only.For more details on dialects, see [fblangref50-structure-dialects]

Delimited identifier syntax
<delimited identifier> ::= "<permitted character>[<permitted character> ...]"
Note

A delimited identifier such as "FULLNAME" is the same as the regular identifiers FULLNAME, fullname, FullName, and so on.The reason is that Firebird stores regular identifiers in upper case, regardless of how they were defined or declared.Delimited identifiers are always stored according to the exact case of their definition or declaration.Thus, "FullName" (quoted, or delimited) is different from FullName (unquoted, or regular) which is stored as FULLNAME in the metadata.

Literals

Literals are used to directly represent values in a statement.Examples of standard types of literals are:

integer        - 0, -34, 45, 0X080000000;
fixed-point    - 0.0, -3.14
floating-point - 3.23e-23;
string         - 'text', 'don''t!', Q'{don't!}';
binary string  - x'48656C6C6F20776F726C64'
date           - DATE '2018-01-19';
time           - TIME '15:12:56';
timestamp      - TIMESTAMP '2018-01-19 13:32:02';
boolean        - true, false, unknown
null state     - null

Details about literals for each data type are discussed in section Literals (Constants) of chapter Common Language Elements.