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
Before you give the explain statement, what are the prerogatives?
What is coalesce in db2?
What is multi row fetch in db2?
What is consistency token in db2?
What is the reason behind not using select * in embedded sql programs?
What are foreign keys in db2?
What kind of database is db2?
Mention some fields that are a part of sqlca.
What is package in db2 mainframe?
How and when does the db2 enforces the unique key?
What is a storage group (stogroup)?
Which component is responsible for db2 startup and shutdown?
What is db2 bind?
How does a cursor work?
How to get the ddl of a table in db2?