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

How do you delete data from a table?

0 Answers  


What is cte?

0 Answers  


How to fetch the rows by dynamicaly passing table name through cursor?

3 Answers  


what happens if you no create privilege in a database? : Sql dba

0 Answers  


What are pl sql procedures?

0 Answers  






how to insert values like 10:10:00,30:25:00 etc.into table after insert how can i sum the above insert values to get the result as 40:35:00

3 Answers  


What is difference between sql function and stored procedure?

0 Answers  


How many sql databases can you have on one server?

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  


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

0 Answers  


explain the difference between delete , truncate and drop commands? : Sql dba

0 Answers  


How to start the command-line sql*plus?

0 Answers  


Categories