FirebirdSQL logo

Identifiers

All database objects have names, often called identifiers.The maximum identifier length is 63 characters character set UTF8 (252 bytes).

Note

It is possible to restrict the actual maximum identifier length through configuration.Consult theFirebird 4.0 Release Notesfor details.In this language reference we assume the default configuration of 63 characters (252 bytes).

Two types of names are valid as identifiers: regular identifiers, similar to variable names in regular programming languages, and delimited identifiers that are specific to SQL.To be valid, each type of identifier must conform to a set of rules, as follows:

Rules for Regular Identifiers

  • Length cannot exceed 63 characters

  • The name must start with an unaccented, 7-bit ASCII alphabetic character.It may be followed by other 7-bit ASCII letters, digits, underscores or dollar signs.No other characters, including spaces, are valid.The name is case-insensitive, meaning it can be declared and used in either upper or lower case.Thus, from the system’s point of view, the following names are the same:

    fullname
    FULLNAME
    FuLlNaMe
    FullName
  • Regular identifiers are stored in uppercase

Regular name syntax
<name> ::=
  <letter> | <name><letter> | <name><digit> | <name>_ | <name>$

<letter> ::= <upper letter> | <lower letter>

<upper letter> ::= A | B | C | D | E | F | G | H | I | J | K | L | M |
                   N | O | P | Q | R | S | T | U | V | W | X | Y | Z

<lower letter> ::= a | b | c | d | e | f | g | h | i | j | k | l | m |
                   n | o | p | q | r | s | t | u | v | w | x | y | z

<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9