Derived Table Syntax | SQL SELECT Statements | Teradata Vantage - Derived Table Syntax - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™
FROM derived_table_spec [,...]

Syntax Elements

derived_table_spec
( [ with_modifier ] subquery ) [AS] derived_table_name [ ( column_name [,...] ) ]
with_modifier
See WITH Modifier.
subquery
Nested SELECT expressions.
You can specify NORMALIZE in a subquery.
You cannot specify SELECT AND CONSUME statements in a subquery. You cannot specify an EXPAND ON clause in a subquery.
derived_table_name
Name of the derived table.
column_name
List of column names or expressions listed in the subquery. Enables referencing subquery columns by name.
Specify column names only. Do not use forms such as table_name.column_name or database_name.table_name.column_name.
If specified, the number of names in the list must match the number of columns in the RETURNS TABLE clause of the CREATE FUNCTION statement that installed the function_name table function. The alternate names list corresponds positionally to the corresponding column names in the RETURNS TABLE clause.
If omitted, the names are the same as the column names in the RETURNS TABLE clause of the CREATE FUNCTION statement that installed the function_name table function.