Look for duplicate records.
-- should be 0
SELECT col01, col02 FROM tbTable01 GROUP BY col01, col02 HAVING COUNT(*) > 1
Remove duplicate records
DELETE FROM tbTable01 WHERE biId IN
(
SELECT MAX(biId) FROM tbTable01 GROUP BY col01, col02 HAVING COUNT(*) > 1
)
Comments