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: )

289 reads

Blogs

A New Word: Feresy

By

feresy – n.  the fear that your partner is changing in ways you don’t...

Mastering the ORDER BY Clause in SQL Window Functions

By

This article provides a comprehensive overview of the ORDER BY clause within SQL window...

SQL Data Pipelines: The Ultimate Guide to Streamlining Your Data Flow

By

Want to build a data analytics foundation that transforms raw data into valuable business...

Read the latest Blogs

Forums

The Cloud Security Problem

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Cloud Security Problem, which...

MySQL joining - a tricky problem from a newby

By dkreynolds

Hi, I'm not even sure whether this is possible. I've three tables, one containing...

Iterative query to sum a colum relating to dates.

By Tallboy

Hi, I have a simple table with 5 columns as follows with about 80,000...

Visit the forum

Question of the Day

No Renames

Which of these can't be renamed with sp_rename?

See possible answers