Chapter 11 – SET Operators

Set Operators

The Teradata database provides the ANSI standard SET operators: INTERSECT, UNION, and EXCEPT, as well as the Teradata MINUS extension. They are quite simply named for the way they work. It is said that SQL is set oriented with each SELECT returning a set of rows. The SET operators are used to combine answer sets from multiple SELECT statements into a single answer set. The benefit to these operators is that the separate SELECT operations can run in parallel, prior to being combined. Additionally, they all run as a single transaction.

Considerations for Using Set Operators

The following considerations are guidelines for writing each SELECT when using SET operators:

  1. Must specify the same number ...

Get Tera-Tom on Teradata SQL V12-V13 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.