what is differece between union and union all

Answer Posted / dinesh waitage

1)Union is used to select distinct values from two tables
where as union all is used to select all values including
duplicates from the tables.

2)UNION - returns on Distinct rows/Slower in performance
UNION ALL.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to test a dml trigger in ms sql server?

572


What's new in sql management studio for sql server? : sql server management studio

576


How would you add a section to a table?

562


What is a transact-sql statement?

535


How do you migrate data from mssql server to azure?

151






What is Service Broker in sql server 2012?

618


Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?

565


is there a column to which a default can't be bound? : Sql server database administration

533


Disadvantages of the indexes?

587


What is sqlservr.exe - process - sql server (sqlex?press)?

598


What is CTE in SQL

538


What is an etl file?

524


How to scale out a federation by Sql statement?

92


What is the difference between DataRow.Delete() and DataRow.Remove()?

728


you have a table with close to 100 million records recently, a huge amount of this data was updated now, various queries against this table have slowed down considerably what is the quickest option to remedy the situation? : Sql server administration

540