How will you delete duplicate records from a table?

Answer Posted / tharanath.n

delete from table a
where rowid >(select min(rowid) from table b
where a.column = b.column);

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I import a csv file into db2?

556


Mention the way of highlighting as well as putting a cursor to use in a cobol program.

624


List out the data types available.

694


What is an instance in db2?

561


Explain the contention situations caused by locks?

588






What is the physical storage length of the data types: date, time, timestamp in the db2 database?

642


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

10745


Which component is responsible for processing sql statements and selecting access paths?

657


Explain how can you do the explain of a dynamic sql statement?

649


Mention some fields that are a part of sqlca.

596


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

626


What is a plan and package in db2?

613


Comment whether the cursor is closed during commit or not.

665


Define predicate?

641


How do I delete a table in db2?

642