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

Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference

860


Define declaration generator (dclgen).

760


What is buffer pool?

728


What is a page in db2?

692


What are the prerogatives?

701






How does cobol compile db2 program?

707


Explain dclgen.

808


What are the full forms of spufi and dclgen and why are they used?

734


What are the two types of logging in the db2 database? Explain them.

673


What is a Foreign Key?

744


Is db2 a programming language?

693


What are packages in db2?

688


What is data manager?

695


Explain about mirror activator disk mirroring?

655


How to execute stored procedure in db2 command editor?

630