I have a few tables w/o indexes which now have duplicate rows. Does anyone have any scripts to count/delete them?? Thankx.
delete duplicate records
Please find the select, change it to delete when satisfied :
select itcd, des from item_m x
where itcd in (select itcd from item_m y
where x.rowid != y.rowid
and x.itcd = y.itcd)
assumptions : table name item_m
you want duplicate on itcd field
from test_equip T1
where T1.RowID >
from test_equip T2
where T1.equipment_id =T2.equipment_id);
This script will give you the duplicate value in your table. But it's giving only one value in duplicates. So if you want to delete then just replace select * with DELETE. Hope it will work for you.
Click Here to Expand Forum to Full Width