Firebird query to list out rows having duplicate values in columns
SELECT * FROM "TABLE1" t1 WHERE EXISTS (SELECT 1 FROM " TABLE1" t2 WHERE t1."COLUMN1" = t2."COLUMN1" AND t1.RDB$DB_KEY < t2.RDB$DB_KEY); This query will list out only the rows from TABLE1 which have duplicate values in COLUMN1.
No comments:
Post a Comment