21 September 2014

SQL : Check for duplicate table name

Here’s how I checked for duplicate names on one table:

SELECT columnname,
 COUNT(columnname) AS NumOccurrences
FROM tablename
GROUP BY columnname
HAVING ( COUNT(columnname) > 1 )


Delete Duplicate Records using SQL

Here’s an helpful links to delete duplicate records.

http://www.cryer.co.uk/brian/sql/sql_delete_duplicates.htm

No comments:

Post a Comment