Introduction:
Here I will explain difference between UNION and UNION ALL in SQL server. Union operator will return unique records from tables and Union All in SQL server will return all the records from the tables including duplicate values also.
Description:
In previous articles I explained SQL Server change identity column value, replace multiple spaces with single space in sql, reseed identity column value in sql server, get only month and year from date in sql server, substring function in SQL server and many articles relating
to SQL
server. Now I will explain difference between UNION and UNION ALL in SQL server.
Generally Union Operators are used to combine the result of two or more select queries into single result set.
Generally Union Operators are used to combine the result of two or more select queries into single result set.