I need a quick way to delete duplicate records out of a database table that has no key values. This table has no relations with other tables as well, it is just a working table from a bulk load insert. I have tried the following
delete from foo where exists (
select null from foo f where f.number = foo.number and
f.type = foo.type and
f.date = foo.date)
but that deletes all the records in my table and not just the duplicate ones. Any help is greatly appreciated.
delete from foo where exists (
select null from foo f where f.number = foo.number and
f.type = foo.type and
f.date = foo.date)
but that deletes all the records in my table and not just the duplicate ones. Any help is greatly appreciated.