Outer Join Syntax | SQL Joins | Teradata Vantage - Outer Join Syntax - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-05
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantage™
left_table { LEFT | RIGHT | FULL } [ OUTER ] JOIN right_table ON join_condition

Syntax Elements

left_table
Table reference that appears to the left of the join type keywords.
LEFT [ OUTER ]
Outer join with the table that was listed first in the FROM clause.
In a LEFT OUTER JOIN, the rows from the left table that are not returned in the result of the inner join of the two tables are returned in the outer join result and extended with nulls.
RIGHT [ OUTER ]
Outer join with the table that was listed second in the FROM clause.
In a RIGHT OUTER JOIN, the rows from the right table that are not returned in the result of the inner join of the two tables are returned in the outer join result and extended with nulls.
FULL [ OUTER ]
Rows are returned from both tables.
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.
right_table
Table reference that appears to the right of the join type keywords.
join_condition
Columns on which the join is made separated by the comparison operator that specifies the comparison type for the join.
The join conditions of an ON clause define the rows in the left table that take part in the match to the right table. At least one join condition is required in the ON clause for each table in the outer join.
You can include multiple join conditions in an ON clause by using the Boolean AND, OR, and NOT operators.