Explain UNION, MINUS, UNION ALL and INTERSECT
Answer posted by Scott on 2005-05-25 18:32:51: UNION - the values of the first query are returned with the values of the second query eliminating duplicates.
MINUS - the values of the first query are returned with duplicates values of the second query removed from the first query.
UNION ALL - the values of both queries are returned including all duplicates
INTERSECT - only the duplicate values are returned from both queries.
Editorial / Best Answerrampratap409
UNION: Take the common record once( No Duplicate)
UNION ALL : Takes Duplicates also
Minus: Result of first query - result of second query
select * from emp where rownum<=9;
select * from emp where rownum<9;
this will display 9th row of emp
Intersect: common result of both query
- Dns server faults
- Form of fact and dimension table
- Why star delta starter prefer to d.O.L starter for large motors?
- Register a component in multiple locations
- Peoplesoft pages
- Find and grep command
- Define a return statement
- How to join data from two partitions of a multifile in abinitio..!
- How to analyze the explain plan?
- What is differrence between multifile and adhoc files?
- Dns query
- Save button test case
- Real time claims processing
- 40 ibm Oracle DBA interview questions
- Call test in software testing
- Game of jack straws
- Data structure to maintain photographs database
- Reports development
- For etl testers
- What can be the side effects of using automation tools while testing ?