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

What is the use of predicate?

784


How can you quickly find out the # of rows updated after an update statement?

791


What is a storage group (stogroup)?

988


Explain packages.

863


Define db2 and its databases?

813


How to run db2 command in windows?

873


How do I copy a table in db2?

753


What is a system catalog table in db2?

826


What is db2 and what is the use of db2 optimizer?

831


What is temporal table in db2?

794


What are the rules for db2 programming?

852


How do I import a csv file into db2?

743


What is query_cache_limit?

744


What is the maximum size of varchar data type in db2?

846


How do you eliminate duplicate values in db2?

895