The Union operator is used to combine the results of two or more SELECT queries. When you use UNION, SQL Server removes any duplicate rows from the final result set, while UNION ALL includes all rows, even duplicates. The Union operator in the execution plan has a Concatenation or Merge Join Concatenation logical operator, which represents the union of multiple result sets.
Icon of this Operator.
See the example.
select 'Bagesh' union select 'Bagesh' union select 'Kumar' |
No comments:
Post a Comment
If you have any doubt, please let me know.