Explain UNION,MINUS,UNION ALL, INTERSECT?



Explain UNION,MINUS,UNION ALL, INTERSECT?..

Answer / pavan_1981

UNION:set of all rows selected by both queries excluding
duplicates rows.
UNIONALL:set of all rows selected by both queries including
duplicate rows.
MINUS:set of all rows present in the first query and not
present in the second query.
INTERSECT:set of all rows commonly returned by both the
queries.

Is This Answer Correct ?    20 Yes 4 No

Post New Answer

More SQL PLSQL Interview Questions

what is self-join? : Sql dba

0 Answers  


Types of cursor locks and explanation each of them ?

3 Answers   DELL, HP Finsoft,


I have 2 table A and B. In A 1 lakh record is present. In b 20 thousand data is present. To get the unique data from table A and B which join we should prefer left inner join or right outer join. Please answer.

4 Answers   GE,


What is nvl?

0 Answers  


wht is the difference between truncat,drop in sqlserver wht is the difference between function and stored procedure

3 Answers   Apollo,






What does rownum mean in sql?

0 Answers  


Why do we need databases?

0 Answers  


What is sql server and ase?

0 Answers  


Is sql developer case sensitive?

0 Answers  


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

0 Answers  


What are the different datatypes available in PL/SQL?

0 Answers  


What is pls integer?

0 Answers  


Categories