finding duplicate records

SELECT COL_TO_CHECK, COUNT(COL_TO_CHECK) FROM table1 GROUP BY COL_TO_CHECK HAVING COUNT(*) > 1 ORDER BY COUNT(*) If there is more than 1 column with that value it will show up like: COL_TO_CHECK COUNT(COL_TO_CHECK) โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”- Value 3 Value2 2 Value99 4

More
  • 2010-07-08