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 |
What is the use of value function?
What happens to a tablespace when its recovery infromation has been removed and a full recovery is no longer possible?
How to resolve -504 sql code in DB2?
What type of database is db2?
What is the role of schema in the db2 database?
How can you display the current date & current time ?
What is a Foreign Key?
0 Answers Tavant Technologies, Zensar,
I have a DB2 table which has 1000 rows.after udatingg first 110 rows, my job abends. Now what I have to do if I want to restart the job next time so that it should start updating from 111th row (without updating first 110 rows again).
If a table has a column "dept" (declared to have nulls) and there are 10 rows in the table of which 3 have a null value in the dept column, what will select count(*) and select count(distinct dept) return?
Why might full image copies be faster to implement than an incremental image copy?
What is db2 plan table?
How to create backup table in db2?