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,086 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

576 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

410 reads

Blogs

Removing a PowerShell Array Element–#SQLNewBlogger

By

I saw an article on this and realized I had no idea how to...

PostgreSQL Backup Failure

By

In this blog post I wrote a tip about fixing the PostgreSQL backup failure...

Dynamic Data Masking – SQL Server

By

Use Dynamic Data Masking to protect your data The post Dynamic Data Masking – SQL...

Read the latest Blogs

Forums

Need help with the query

By LearningDBA

How do I add 0 in the beginning but the length of the value...

GitHub Copilot - Our Best Ally for T-SQL

By Daniel Calbimonte

Comments posted to this topic are about the item GitHub Copilot - Our Best...

Lead Updates Not Working, Only Rendering Nulls

By Zososql

I hav a table that holds sports betting lines that i am using in...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers