© Clare Churcher 2016

Clare Churcher, Beginning SQL Queries, 10.1007/978-1-4842-1955-3_7

7. Set Operations

Clare Churcher

(1)Studio B Productions, Great Neck, New York, USA

One of the great strengths of relational database theory is that the tables (or, more formally, the relations) are made up of distinct rows and so can be considered a set. We can then use set operations to help with combining and extracting specific information. The types of questions that set operations help with are those such as “which people are in both these sets?” or “which people are in this set but not that one?”

In Appendix 2 you can find some formal notation that is helpful with managing set operations. In this chapter we will keep formalities to a minimum, but the symbols ...

Get Beginning SQL Queries: From Novice to Professional, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.