Technical Article

Remove Duplicates from Table - No Cursors

This script deletes all duplicates from a table.  It keeps the first instance of the record, and discards all others.  If you want to keep the last instance of the record, use MAX instead of MIN.  The script can be modified very easily to include more/less fields for comparison.  I've successfully used this SP to […]

You rated this post out of 5. Change rating

2004-07-27 (first published: )

290 reads

Blogs

T-SQL Tuesday #182: Personal Integrity

By

It’s time for the first T-SQL Tuesday blog of 2025, with an invite from...

SQL Saturday Oregon & SW Washington 2024

By

Wow I am so late in posting these notes! But this conference was amazing,...

Challenges Enterprises Face When Adopting AI

By

The post Challenges Enterprises Face When Adopting AI appeared first on Joyful Craftsmen.

Read the latest Blogs

Forums

Transfer data from azure vm to blob storage

By manoj2001

Hi Experts I want to move data/ some million rows from a Azure vm...

How do I fix the, "Unable to process the existing user settings" error message?

By Rod at work

I'm sure I've asked this question in either this forum, or another one, in...

Cannot restore new DB

By Edvard Korsbæk

I have made an empty DB called "HJEM_BB" I try to fill it from...

Visit the forum

Question of the Day

The AG Secondary Logs

What happens when an AG secondary receives a log record from the primary?

See possible answers