WHERE Clause Defines Condition for Joining Table Rows - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

WHERE Clause Defines Condition for Joining Table Rows

A WHERE clause can define a condition for joining table rows, typically for a situation in which the values in a common column must match in both tables.

The following statement, which asks for the name of each employee from the employee table and the location of the department for each employee from the department table, is processed by joining the employee and department tables on the WHERE clause equality condition employee.dept_no=department.dept_no.

     SELECT name, loc 
     FROM employee, department 
     WHERE employee.dept_no = department.dept_no;