DM-05-Tradisional Set Operator
DM-05-Tradisional Set Operator
A UNION B
A INTERSECT B
A MINUS B
4-1
Data Compatibility
▪ Strong requirement
▪ Same number of columns
▪ Each corresponding column is compatible
4-2
SQL UNION Example
Example : Retrieve basic data about all university people
4-3
SQL UNION Example
4-4
Oracle INTERSECT Example
Example : Show teaching assistants, faculty who are students. Only
show the common columns in the result.
4-5
SQL INTERSECT Example
4-6
Oracle MINUS Example
Example : Show faculty who are not students (pure faculty). Only show
the common columns in the result.
4-7
ORACLE MINUS Example
4-8