How will you delete duplicate records from a table?

Answer Posted / ajay kumar ande

question is wrong......records-----files,table-----rows
How will you delete duplicate records(rows) from a table?

pgm=sort
sortin dd dsn=-----
sortout dd dsn=-----
sysin dd *
sort fields=(2,3,ch,a)
sum fields=none ------>eliminates duplicate recs

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

6262


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2285


Outputs of explain are with matchcols = 0. What does this signify?

622


What is the cobol picture clause of the db2 data types date, time, timestamp?

621


List out the three types of page locks that can be held.

689






How many databases are there?

594


What are the rules for db2 programming?

646


What is coalesce in db2?

682


How would you find out the total number of rows in a db2 table?

579


List down the types of triggers in the db2 database?

594


How can deadlocks be resolved?

544


What is explain plan in db2?

592


What is the difference between plan and package in db2?

581


What is buffer pool and list some of them?

630


What are packages in db2?

599