Set Operators in View Definitions - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Set operators are permitted within view definitions.

For example, the following REPLACE VIEW statement uses UNION within a view definition:

REPLACE VIEW view_1 AS 
   SELECT x1,y1 
   FROM table_1 
   UNION 
   SELECT x2,y2 
   FROM table_2;

GROUP BY can be used within views with set operators.

For a SELECT statement applied on the view that can use ORDER BY and GROUP BY that can be used within views with set operators, see GROUP BY and ORDER BY Clauses.