SQL Server Personal FAQs

di Luigi Boschetti

How to find Duplicates in a Table?

SELECT ColA, ColB, COUNT(*) NumRecords FROM t1 GROUP BY ColA, ColB HAVING COUNT(*) > 1;

References:

How to find where an SQLServer Object is referenced?

You can use the sys.sp_depends:

exec sys.sp_depends 'object_name'

Thanks to: David R Tribble.

References: