source - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Publication Date
February 2025
Publication ID
B700-4600-008K
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
ft:sourceId
dita
dita:id
jbe1714339405530
FROM
The names of one or more tables or views from which expression is to be derived.
You can create views that reference global temporary tables and volatile tables.
A view can reference a global temporary trace table, but this view is not updatable. See CREATE GLOBAL TEMPORARY TRACE TABLE.
You cannot create a view that references a queue table . See CREATE TABLE (Queue Table Form).
For information about the FROM clause, see FROM Clause.
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.
You can create views that reference global temporary tables and volatile tables.
A view can reference a global temporary trace table, but this view is not updatable. See CREATE GLOBAL TEMPORARY TRACE TABLE.
You cannot create a view on a queue table. See CREATE TABLE (Queue Table Form).
INNER
A join in which qualifying rows from one table are combined with qualifying rows from another table according to a specified join condition.
INNER is the form specified by the ANSI SQL-2011 standard. Teradata also supports an extension that allows you to separate join relations using COMMA characters.
Inner join is the default join type for view definitions.
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.
See Outer Joins for more information.
LEFT OUTER
An outer join on the table or view that was listed first in the FROM clause.
In a LEFT OUTER JOIN, the rows from the left table or view that are not returned in the result of the inner join of the two tables/views are returned in the outer join result and extended with nulls.
RIGHT OUTER
An outer join on the table or view that was listed second in the FROM clause.
In a RIGHT OUTER JOIN, the rows from the right table or view that are not returned in the result of the inner join of the two tables/views are returned in the outer join result and extended with nulls.
FULL OUTER
A join that returns rows, including non-qualifying rows, from both tables or views.
In a FULL OUTER JOIN, rows from both tables that have not been returned in the result of the inner join are returned in the outer join result, and extended with nulls.
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.
See Object Names for the rules for naming database objects.
You cannot create or replace a view on a queue table (see CREATE TABLE (Queue Table Form)).
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.
You cannot specify a SAMPLE clause within a subquery predicate within an ON clause.
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.
You cannot create or replace a view on a queue table (see CREATE TABLE (Queue Table Form)).

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 Derived Tables.

subquery
A SELECT request that defines the derived table.
You cannot specify the TOP n or TOP m PERCENT options in a subquery.
See the following topics:
You cannot specify an ORDER BY clause in the subquery specification of a CREATE VIEW request.
derived_table_name
The name of a derived table.
For information about naming database objects, see Object Names.