© 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 O’Reilly online learning.

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