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

Answer Posted / gouri

select column_1 from tablename groupby column1 having coun(*)>1

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

777


Define declaration generator (dclgen).

760


List down the types of triggers in the db2 database?

684


What is a system catalog table in db2?

683


can all users have the privilage to use the sql statement select * (dml)?

734






What is the clustering index in the db2 database?

651


Why select is not preferred in embedded sql programs?

816


How to fetch the last row from the table in SQL (db2)?

1149


What does db2 stand for?

672


What is the usage of open cursor command?

684


What is the purpose of rollback and commit?

677


How do you select a row using indexes in db2?

742


Is ibm db2 free?

664


What are the 2 sqlcodes that are returned?

731


What is check constraint in db2?

706