Flicker Images

Find programmers and grapic design experts at ScriptLance.com

Friday, October 5, 2012

Finding Duplicates rows with SQL Server

This article shows how to find duplicated rows in a database table. This is a very common beginner question. Here is a useful sql query to help identify duplicate values in a column and return a count of the number of times that value appears.Following query demonstrates usage of GROUP BY, HAVING in one query and returns the results with duplicate column .  



SELECT ColumeName, COUNT(ColumnName) TotalCount
FROM TableName
GROUP BY ColumeName
HAVING COUNT(ColumnName) > 1


Share:

Game Reviews

BTemplates.com

Powered by Blogger.

Search This Blog

Video Of Day

Find Us OIn Facebook

Blogroll

Contact

Tackle the Web with up to 5 new .COMs, $5.99 for the 1st year!

Advertisement