minus
Problem
Given two relations with the same heading, remove all of the tuples in one from the other.
Example: I want all the products except those in the list of discontinued products.
Description
The set difference of two relations. The result contains those tuples that are in left
but not in right
.
The result’s heading is identical with that of the inputs’.
Requirements
The headings of the two relations must be identical.
Example
Generated SQL
Note that the scoping of the table alias t1
is limited to the respective SELECT
clauses, which is why the same alias is used in both clauses.