O'Reilly logo

Oracle® SQL by Example, Third Edition by Alice Rischert

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 8. Set Operators

Set operators combine two or more sets of data to produce a single result set. Oracle has four set operators: UNION, UNION ALL, MINUS, and INTERSECT. The UNION and UNION ALL operators combine results. The INTERSECT operator determines common rows. The MINUS operator shows differences between sets of rows.

The sets of data in a set operation are SELECT statements, as simple or as complex as SELECT statements can be written. When writing any set operation, there are two rules to remember:

  • Each of the SELECT lists must contain the same number of columns.

  • The matching columns in each of the SELECT lists ...

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