Ezequias Rodrigues da Rocha wrote:
Hi list,
I am making some data minning and would like to know if someone tell
me how to retrieve the duplicate records based in one or two fields of
my table.
Any help would be welcomed.
You can use a simple query like this one:
select t1.id, t2.id
from table t1, table t2
where t1.record1 = t2.record1
and t1.record2 = t2.record2
and t1.id != t2.id
This one lists the ids of the matching records. You may need to fine
tune it to your needs, e.g. use distinct or replace the != with <.
Zizi
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend