Eliminate Duplicates

This will find and delete all duplicate rows. You can refine the granularity of uniqueness by including more columns than just the Primary Key. If you are picky about which rows you want to delete, don't use this. Instead use the 'Find Duplicates' script I just submitted and then delete manually.

2002-05-24

1,082 reads

Find Duplicates

Find duplicates in any table, and report the number of duplicates. Enter in the table name, and the field or fieldsfor which there should only be one row for each of that field, but you suspect are more. For example, if an employee table has more than one record for an employeethis will find any […]

5 (1)

2002-05-24

572 reads

TableCounts

This script generates a statement that you would then run in the user database to get rowcounts of all tables. The advantages of this approach are you can modify it to get just the tables you want, and the output is easy to read:Table1-------1069Table2------10427

2002-05-24

407 reads

Blogs

Book Review: Lights Out

By

I have always been interested in GE since I was a kid. My best...

A Successful Blogger on Making the Switch

By

For Kyla Marie Charles, switching to WordPress.com opened up possibilities for her website and...

Login Timeouts

By

I was recently approached at work about a company that was seeing tons of...

Read the latest Blogs

Forums

SQL Server internal variable with DML type

By sergino.taglia

Can you advice how to retrieve the DML type a query is running? Does...

How to Convert Oracle SQL to T-SQL

By carlton 84646

Hello Community, I have been given a challenge of converting the following SQL code...

Right place for newly graduates?

By LeviHampton

Hi everyone, I have a brother who just graduated with a programming major. And...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers