What is the difference among UNION, MINUS and INTERSECT?

Technology CommunityCategory: SQLWhat is the difference among UNION, MINUS and INTERSECT?
VietMX Staff asked 3 years ago
  • UNION combines the results from 2 tables and eliminates duplicate records from the result set.
  • MINUS operator when used between 2 tables, gives us all the rows from the first table except the rows which are present in the second table.
  • INTERSECT operator returns us only the matching or common rows between 2 result sets.