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

How to Expose gRPC Services Behind (Almost) Any Load Balancer

Everything is boxes.

An important aspect of test-driven development: What’s my motivation?

My first Sketch for EncorAcademy

CI with Azure in Cypress

Julia Programming Language — From Zero to Expert

Automatic AWS lambda deploy using Github actions

How To Deploy Your .NET Core App on an IIS Server

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

Using the CASE Statement in SQL Server

Best Books/Resources to Learn QlikView & QlikSense🌿

Tableau: Getting Started

How to create databases and tables?