Database Object Naming Conventions (Language Reference Guide)

From InterBase
Jump to: navigation, search

Go Up to SQL Statement and Function Reference


When an applications programmer or end user creates a database object or refers to it by name, case is unimportant. The following limitations on naming database objects must be observed:

  • Start each name with an alphabetic character (A–Z or a–z).
  • Restrict object names to 67 characters, including dollar signs ($), underscores (_), 0 to 9, A to Z, and a to z. Some objects, such as constraint names, are restricted to 27 bytes in length.
  • Keep object names unique. In all cases, objects of the same type–all tables, for example–must be unique. In most cases, object names must also be unique within the database.

To use keywords, ASCII characters, case-sensitive strings, or spaces (except for trailing spaces) in an object name, enclose the name in double quotes. It is then a delimited identifier. Delimited identifiers must always be referenced in double quotes. In InterBase dialect 3, names enclosed in double quotes are case sensitive. For example:

SELECT “CodAR” FROM MyTable

is different from:

SELECT “CODAR” FROM MyTable

This behavior conforms to ANSI SQL semantics for delimited identifiers.

For more information about naming database objects with CREATE or DECLARE statements, see the Language Reference Guide.