O'Reilly logo

V14 Certification: Teradata SQL by Tom Coffing, Leona Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16 – Set Operators Functions

"The man who doesn't read good books has no advantage over the man who can't read them."

-Mark Twain

Rules of Set Operators

1.Each query will have at least two SELECT Statements separated by a SET Operator

2.SET Operators are UNION, INTERSECT, or EXCEPT/MINUS

3.Must specify the same number of columns from the same domain (data type/range)

4.If using Aggregates, both SELECTs much have their own GROUP BY

5.Both SELECTS must have a FROM Clause

6.The First SELECT is used for all ALIAS, TITLE, and FORMAT Statements

7.The Second SELECT will have the ORDER BY statement which must be a number

8.When multiple operators the order of precedence is INTERSECT, UNION, and EXCEPT/MINUS

9.Parentheses can change the order ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required