Subject Re: How to count duplicate rows using SQL
Author Svein Erling
> How to count duplicate rows using SQL ? I must localize duplicate
> rows in my (possibly corupted ) database and delete unnecessary.

SELECT <ID>, COUNT(*)
FROM <TABLE>
GROUP BY <ID>
HAVING COUNT(*) > 1

or something similar I think.

> How often Firebird could cause index to be corrupted due to
> duplicate rows and why ?

I don't know, but it shouldn't happen often unless you do something
strange like having forced writes off or handling its uniqueness
yourself rather than take advantage of primary keys and unique
indexes.

Set