DB2 SQL DELETE DUPLICATE DATA FROM THE TABLE.

Delete from EMPLOYEE E1 
where RRN(E1) > (Select MIN(RRN(E2)) from EMPLOYEE E2 where E2.id = E1.id)
Select MIN(RRN(E2)) from EMPLOYEE E2 where E2.id = 1

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store