ANSI SQL defines three operationsUNION, INTERSECT, and EXCEPTthat you can apply to two sets. These operations let you combine rows from different sets, locate which rows exist in both input sets, or find which rows exist in one set but not the other. Each of these operations has many uses and practical implementations. For example, you can use UNION to combine sales data from partitioned tables, INTERSECT to find which customers are also employees, and EXCEPT to find which customers aren't employees. However, T-SQL supports only the UNION operation. Fortunately, you have alternatives in T-SQL that you can use to provide the functionality of the missing operations.
...This article is for paid Professional Members only.
Already a Professional Member? Please log in now: