What is UNION,UNION ALL?
Answers were Sorted based on User's Feedback
Answer / sanjudharan
UNION : eliminates duplicates
UNION ALL: retains duplicates
Both these are used to combine the results of different
SELECT statements.
Suppose I have five SQL SELECT statements connected by
UNION/UNION ALL, how many times should I specify UNION to
eliminate the duplicate rows? -
Once.
| Is This Answer Correct ? | 22 Yes | 9 No |
There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 employes........
I have a main program (A) where we delete some rows in table in a cursor, and we commit it in sub program(B). What will happen - will we get an error or not?
What are the various locks available?
Which is faster delete or truncate?
why we create view.
Mention the location where the output received from explain statement is stored.
I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?
What is db2 and what is the use of db2 optimizer?
How to find primary key of a table in db2?
What are simple, segmented and partitioned table spaces ?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
What is db2 command?