- Only without
as:FROM tblASt - Only without
as:FROM tbl, exceptions exist:AStFROM JSON_TABLE(…) AS t
SQL allows renaming tables in from and join clauses by providing the optional keyword as followed by the new table name. The table is only known by its new name in the clauses that follow in order of logical evaluation.
SELECT …
FROM tbl_a [AS] a
JOIN tbl_b [AS] bThe SQL standard requires every table in from and join to have a name. Therefore, tables that don’t have a natural name—such as sub-queries—must use this syntax to assign a name.
Extensions
Some systems allow omitting a table name where the standard requires one.
Related
- Tutorials
- Related Features
E051-05, “Select list items can be renamed”
Normative References
E051-08, “Correlation names in the FROM clause”, is a mandatory feature of ISO/IEC 9075-2:2023. It already appeared in ANSI X3.135-1989 but without the optional keyword as, which was introduced with ISO/IEC 9075:1992 as part of the level “intermediate”. Accepting the keyword as became mandatory with ISO/IEC 9075-2:1999.

