See Teradata Vantage™ - SQL Data Manipulation Language, B035-1146 for complete documentation of the FROM clause.
- FROM
- The names of one or more tables or views from which expression is to be derived.
- database_name
- user_name
- Name of the containing database or user for table_name or view_name if something other than the current database or user.
- table_name
- Name of a data table from which columns for this view are to be projected.
- view_name
- Name of a view from which columns for this view are to be projected.
joined_table_source
- joined_table
- Name of a joined user base table or view.
- INNER
- A join in which qualifying rows from one table are combined with qualifying rows from another table according to a specified join condition.
- OUTER
- A join in which qualifying rows from one table or view that do not have matches in the other table or view, are included in the join result. The rows from the outer table or view are extended with nulls.
- LEFT OUTER
- An outer join on the table or view that was listed first in the FROM clause.
- RIGHT OUTER
- An outer join on the table or view that was listed second in the FROM clause.
- FULL OUTER
- A join that returns rows, including non-qualifying rows, from both tables or views.
- JOIN
- An introduction to the name of the second table to participate in the join.
- joined_table
- The name of the joined user base table, view, or derived table.
- ON search_condition
- One or more conditional expressions that must be satisfied by the result rows. An ON condition clause is required if the FROM clause specifies outer join syntax.
- CROSS JOIN
- A CROSS JOIN is an unconstrained, or Cartesian join. The Cartesian product of two tables/views returns a concatenated product of all rows from all tables or views specified in the FROM clause.
- single_table
- Name of a user base table or view participating in the join.
derived_table_source
A derived table is constructed by evaluating a table expression over the columns and values of the base table set. The semantics of derived tables correspond to those of views. A view is similar to a named derived table.
Derived tables allow you to specify a spool file composed of selected data from the base table set supporting the table expression in the FROM list of a query.
For information about derived tables, see Teradata Vantage™ - SQL Data Manipulation Language, B035-1146.
- subquery
- A SELECT request that defines the derived table.
- derived_table_name
- The name of a derived table.