The UNION operator allows you to combine the results of two or more SELECT statements into a single result set. The result sets combined using UNION must all have the same structure. They must have the same number of columns, and the corresponding result set columns must have compatible data types
By default, the UNION operator removes duplicate rows from the result set. If you use ALL, all rows are included in the results and duplicates are not removed.
Thursday, February 14, 2008
Union and Union All
Labels:
SQL,
SQL Database,
SQL Server,
SQL Server Tips
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment