patternsqlModerate
Is the keyword "ALIAS" actually used?
Viewed 0 times
theusedkeywordactuallyalias
Problem
According to PostgreSQL 7.1 through 9.1 (now unsupported),
Where is (or was) the SQL keyword
ALIAS is listed as a reserved word, at least for SQL-99. Later versions do not show it - suggesting that it has been dropped as a reserved word. The old PostgreSQL docs do say "the presence of a key word does not indicate the existence of a feature." When aliasing a table or column I've seen AS, but never ALIAS.Where is (or was) the SQL keyword
ALIAS used? Was it ever in-use or only ever reserved for future-use?Solution
PostgreSQL maintains a list of reserved and non-reserved terms in the appendix.
SQL Standard
-
In SQL-92,
ℹ There is no digitized copy of SQL-86, or SQL-89
ALIAS is absent from that list. You can verify PostgreSQL does not use ALIAS by checking out the YACC grammar. Even as far back as Postgres95 ALIAS was not a reserved word (the first version in the migration from QUEL to SQL)- MySQL does NOT reserve
ALIAS
- MariaDB does NOT reserve
ALIAS
- Oracle does NOT reserve
ALIAS
- SQL Server does (in T-SQL) reserve
ALIAS(as a potential future keyword on their "reserved keyword" list)
SQL Standard
-
In SQL-92,
ALIAS was marked as a `; but, there was no use assigned for that .
-
In SQL-99 ALIAS was marked as an "Additional Reserved Word", and added to the list of ; but, there was no use assigned for that . Perhaps they reserved the term with the intent to define meaning later, and then withdrew it at a different point. Or, perhaps they reserved the term for vendor defined implementation. PostgreSQL reflected the spec's reservation in the docs, and then removed that reservation with the spec.
-
In SQL-2011, ALIAS` is no where to be found and the word "alias" only appears in reference to 'Feature T053, “Explicit aliases for all-fields reference”'ℹ There is no digitized copy of SQL-86, or SQL-89
Context
StackExchange Database Administrators Q#227095, answer score: 16
Revisions (0)
No revisions yet.