SQL provides some set operations for us to use: UNION, EXCEPT, INTERSECTION. The resulting relations of these set operations are sets of tuples - duplicates are eliminated from the result.

Set operations apply only to union compatible relations:

  1. Two relations must have the same number of attributes.
  2. Each corresponding pair of attributes has the same domain.

Set operations: