What is the SQL query to select, delete and get count of
duplicate rows in DB2?

Answer Posted / hkhatri27

SELECT Columns
FROM Table
GROUP BY Columns
HAVING COUNT(*) > 1;

~ Himanshu

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?

1926


What is dpf in db2?

654


What is a page in db2?

598


Why do we use cursor?

583


What is dclgen in db2?

664






What is alias in db2?

558


What is a plan and package in db2?

609


What is node in db2?

598


List out the data types available.

691


What is a bind card?

675


What is difference between isnull and coalesce?

603


What are the benefits of using the db2 database?

654


Mention the definition of cobol in varchar field.

679


Can you use max on a char column?

630


What is the difference between oracle and db2?

578