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

What are the essential components of sql server service broker?

759


How to create a large table with random data for index testing in ms sql server?

736


Can we insert data if clustered index is disabled?

678


Explain the ways to controlling cursor behavior?

702


Explain filtered indexes?

745






Can sql servers linked to other servers?

730


What is awe?

737


What is the report model project?

122


What is database replication? What are the different types of replication you can set up in sql server?

667


How to loop through result set objects using mssql_fetch_array()?

750


List the types of recovery model available in sql server?

667


Do you know what is a with(nolock)?

792


How to drop an existing table with "drop table" statements in ms sql server?

727


What is key set driven?

702


Do you know what is sql injection?

719