Recall that union, intersection, and difference as defined in relational algebra
may occur only between tables that have identical headings. To execute these
operations in SQL, we need to use compound select phrases. Compound selects
are constructed from simple select phrases using the reserved words union,
intersect, and minus. As we shall see, SQL treats union, intersection and dif-
ference as operations between sets of tuples, and therefore, it removes duplicate
values from the results of the queries.