what is the difference between UNION AND UNIONALL

Answer Posted / krishna kant kumar

The UNION operator returns all rows from two or multiple tables and eliminates any duplicate rows but the UNION ALL operator returns from both queries, including all duplications.
The UNION operator can use DISTINCT keyword but the UNION ALL cannot it.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I spool to a csv formatted file using sqlplus?

619


What is the difference between translate and replace in oracle?

765


How can you use check constraints for self referential integrity?

593


You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?

1540


What are the attributes of the cursor?

642






What is the difference between a primary key & a unique key?

676


Is there a combination of "like" and "in" in sql?

671


What is oracle instant client?

640


Is there any function in oracle similar like group_concat of mysql?

639


i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?

1556


Explain the use of ignore option in imp command.

657


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2558


How to see the table columns used in an index?

681


what is the dual table in oracle?

629


What is transport network substrate (tns) in oracle?

665