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

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)
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.