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

--

--

--

A programmer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Composer Scripts

How to fix Commons Lang “Package Does Not Exist” Error

Mailtrim’s First Beta Version for Windows is Here!

Kubernetes Cluster Multi Tenancy

4 Data Collection Tools You Should Not Miss In 2022

Erlich pitches Jian-Yang’s app as a “Shazam for food” — HBO’s Silicon Valley

Serializing a Python Object Into a Plain Text String

Docker Made Easy for Data Scientists

Keep it simple as SOLID

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
Sumit goyal

Sumit goyal

A programmer.

More from Medium

Top Power BI Mistakes to Avoid

Top Power BI Mistakes to Avoid

How to use “Esquisse” in VS Code to create visualizations

Combining rows with same identifier by using only formula in Excel

SELECT statement for SQL

SELECT statement for SQL