Example: Searching when DeptNo Has Two Columns

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

Using a similar example but assuming that the DeptNo is divided into two columns, the following statement could be used:

   SELECT Name 
   FROM Employee 
   WHERE (DeptNoA, DeptNoB) IN
    (SELECT DeptNoA, DeptNoB 
     FROM Department 
     WHERE Loc = 'LAX') ;