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


Please Help Members By Posting Answers For Below Questions

How do I start db2 in windows?

815


What is lock escalation in db2?

781


Are view updateable?

821


What does reorg do in db2?

787


What is reorg and runstats in db2?

958


What is table space in db2?

793


What is db2?

928


can we view the access paths created by dbrm ? how ? thx

6658


What is load utility in db2?

905


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

809


What is the information associated with sysibm.syslinks table?

886


How will you return the number of records in table?

716


What is multi row fetch in db2?

784


Who uses db2?

774


What is rct?

989