17.10 - Example: ANY - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1145-171K
Language
English (United States)

The following statement uses the ANY quantifier to retrieve every row from the Project table, which contains either the Accounts Payable or the Accounts Receivable project code:

   SELECT * FROM Project 
   WHERE Proj_Id LIKE ANY 
    (SELECT Proj_Id 
     FROM Charges
     WHERE Proj_Id LIKE ANY ('A%')) ;