what is the difference between union and union all

Answer Posted / soubhagya

Union:
It retrieves only distinct records.

Union all:
This retrieves duplicate records too.

but in performance issue
unioun all is better becoz it doesnot sort, filter the
record so its faster.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List the different type of joins?

582


What is row_number () in sql?

556


How to create an array in pl/sql?

590


How can I delete duplicate rows?

573


How run sql*plus commands that are stored in a local file?

528






How do I access sql anywhere database?

508


What is the use of sqldataadapter?

545


Explain the uses of control file.

627


Can we use loop in sql?

544


What are sql*plus environment variables?

568


What are the different types of triggers?

603


What is a record in pl/sql?

560


Why do we create stored procedures & functions in pl/sql and how are they different?

513


Is merge a dml statement?

532


What is sql key?

527