Identifiers
A SQL identifier is a name used to identify a database object, such as a catalog, database, table, view, function, or column.
Identifiers are case-insensitive.
Regular Identifiers
(letter|digit|_)+
letter
is an ASCII letter (a
-z
or A
-Z
). digit
is an ASCII digit (0
-9
).
Note that a regular identifier can start with a digit.
Delimited Identifiers
`char+`
char
is a character drawn from the supported character set. The backtick character `
can be escaped by repeating it twice (i.e. ``
).
Delimited identifiers are required when the identifier contains special characters. For example, SELECT * FROM a.b
represents a query that selects all columns from table b
in database a
, while SELECT * FROM `a.b`
represents a query that selects all columns from a table named a.b
.