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...

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what is db2 restart?

1691


Differentiate between cs and rr isolation levels? Where do you specify them?

580


What is cursor with hold option in db2?

612


Describe major components of db2?

638


How can tablespace be moved to another dasd volume that is allocated for that tablespace?

743






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

2276


How does a cursor work?

554


How do I create a view in db2?

601


What is sqlca?

618


What is meant by dclgen?

618


What are the rules for db2 programming?

641


How to rename a table in DB2 ?

637


Explain various types of locks in db2?

689


How to access db2 tables in mainframe?

611


What is performance tuning db2?

618