Suppose there are many duplicate records in a Db2 table.
What is the query to retrive only duplicate records?

Answer Posted / chidambara subbu

SELECT City FROM Customers
Group by City
HAVING COUNT(City) > 1

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where can you declare a cursor in a cobol-db2 program?

676


What is runstats and reorg in db2?

905


Where do you specify them?

770


How to find the maximum value in a column in the db2 database?

687


What is nvl in db2?

727






Mention the location where the output received from explain statement is stored.

714


What is the use of reorg in db2?

698


What is the purpose of rollback and commit?

677


How do I import data from excel to db2?

703


What does db2 stand for?

672


What is role in db2?

691


What is the difference between cursor stability and repeatable read isolation levels?

777


What db2 400?

795


What do you mean by rollback?

651


What is the role of schema in the db2 database?

757