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

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

Join the forum, it's quick and easy

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

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

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

Go down

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

Post  maran 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)
maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top

- Similar topics

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