Technical Article

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.

You rated this post out of 5. Change rating

2002-05-24

1,089 reads

Technical Article

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)

You rated this post out of 5. Change rating

2002-05-24

585 reads

Technical Article

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

You rated this post out of 5. Change rating

2002-05-24

413 reads

Blogs

T-SQL Tuesday 188 - Growing the Younger Data Community and Speakers

By

T-SQL Tuesday is a monthly blog party hosted by a different community member each...

Azure Cloud Chronicles with Microsoft MVPs YouTube Channel

By

In my YouTube subscriptions feed, a new video for the Azure Cloud Chronicles with...

T-SQL Tuesday #188: Growing the Community

By

This month we have a great T-SQL Tuesday, hosted by John Sterrett. He has...

Read the latest Blogs

Forums

How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory

By Chandan Shukla

Comments posted to this topic are about the item How a Legacy Logic Choked...

Has the PK been used --

By dbakevlar

Comments posted to this topic are about the item Has the PK been used...

Has the PK been used --

By dbakevlar

Comments posted to this topic are about the item Has the PK been used...

Visit the forum

Question of the Day

Has the PK been used --

You're analyzing a query execution plan in SQL Server to determine whether the query optimizer chose to use a primary key index. Which Dynamic Management View (DMV) would you use to verify the usage of the primary key in the plan?

See possible answers