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

What is hibernate and its relation to sql?

594


Which is faster joins or subqueries?

557


What are the indexing methods?

577


What is offset in sql query?

598


Explain unique key in sql.

566






What is memory optimized?

560


What is sql scripting?

563


What is on delete set null?

570


what is the difference between a having clause and a where clause? : Sql dba

522


What do you mean by query optimization?

552


What do you understand by pl/sql records?

535


what is a relationship and what are they? : Sql dba

552


How to look at the current sql*plus system settings?

606


What is normalization in a database?

614


What is query syntax?

523