How will you delete duplicate records from a table?
Answer Posted / king
DELETE FROM FILE WHERE FIELD = ALL(SELECT FIELD FROM FILE
GROUP BY FIELD HAVING COUNT(*) > 1)
OR
DELETE FROM FILE WHERE FIELD = ANY(SELECT FIELD FROM FILE
GROUP BY FIELD HAVING COUNT(*) > 1)
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What does reorg do in db2?
What is a collection in db2?
What is declare cursor?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
What is copy pending status in db2?
Why do we bind in db2?
What are the rules for db2 programming?
What is scrollable cursor in db2?
What is the syntax for creating a table in the db2 database?
What do you mean by between and in? Is between inclusive of specified range values?
What is dpf in db2?
Are views updateable?
What is load replace in db2?
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
List down the data types in the db2 database.