15.00 - Retaining Duplicate Rows Using the ALL Option - Teradata Database

Teradata Database SQL Functions, Operators, Expressions, and Predicates

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1145-015K
Language
English (United States)

Retaining Duplicate Rows Using the ALL Option

Unless you specify the ALL option, duplicate rows are eliminated from the final result. The ALL option retains duplicate rows for the result set to which it is applied.

Example  

The following query returns duplicate rows for each result set, including the final:

   SELECT statement_1
   UNION ALL 
   SELECT statement_2 
   MINUS ALL 
   SELECT statement_3 
   INTERSECT ALL 
   SELECT statement_4