PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

SQL TIP: To DELETE the records having the duplicate key values

View previous topic View next topic Go down

SQL TIP: To DELETE the records having the duplicate key values

Post  maran on Sat Oct 15, 2016 12:58 am

For example to delete the employee records having the same employee code

DELETE FROM EMPMST A WHERE RRN(A) > (SELECT  MIN(RRN(B)) FROM EMPMST  B  WHERE B.EMPCDE = A.EMPCDE)
avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum