how will i display the duplicate record's from a table...
i don't want to eliminate ...i want to display the duplicate
record...for example in my table i have 10 record's like
record no(1,2,3,4,2,9,6,1) in this ...so i want to receive
duplicates...



how will i display the duplicate record's from a table... i don't want to eliminate ...i ..

Answer / raja_kb

SELECT <Column Name1> FROM Table
GROUP BY <Column Name1> HAVING COUNT(*)>1;

Is This Answer Correct ?    7 Yes 1 No

Post New Answer

More DB2 Interview Questions

What is a clustered index?

1 Answers  


For Read Stability locks are not applicable for phantoms, What is Phantoms?

2 Answers  


I use CS and update a page. Will the lock be released after I am done with that page?

2 Answers  


Why use RUNSTAT Utility?

3 Answers   Merrill Lynch,


What are the disadvantages of PAGE level lock?

3 Answers  






Explain the function done by data manager?

0 Answers  


SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.

0 Answers  


what are extents?

5 Answers  


What is the maximum number of tables that can be stored on a Partitioned Table Space ?

1 Answers   IBM,


Usually, which is more important for DB2 system performance - CPU processing or I/O access?

1 Answers  


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

0 Answers  


What is a NULL value? What are the pros and cons of using NULLS?

2 Answers  


Categories