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

When is the results table for the query in a DECLARE CURSOR statement created?

5 Answers  


Is ibm db2 open source?

0 Answers  


can we view the access paths created by dbrm ? how ? thx

2 Answers   IBM,


What is the role of schema in the db2 database?

0 Answers  


What are the four lockable units for DB2?

1 Answers  






When the like statement is used?

0 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  


How to resolve the -305 error code in DB2? And also please let me know, how to resolve the db2 error codes.

7 Answers   TCS,


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

0 Answers  


How to restart a DB2 program?

0 Answers   Cognizant,


How would you find out the total number of rows in a db2 table?

0 Answers  


what is commit & rollback? When and where is used while compiling a cobol-db2 program?

2 Answers  


Categories