Viewing 5 posts - 1 through 5 (of 5 total)
RBAR...didn't know that...!
I did explain the plan for both and believe it or not the
delete where NOT IN is less cost
Is cost the indicator to look at for the execution...
December 24, 2008 at 9:31 am
What is RBAR?
I agree performance may be better....but probably in most cases
it wouldn't matter on tables with less than 20,000 records
December 24, 2008 at 8:26 am
I think the author meant to say that the ID column is unique
his query is:
--Find duplicate records
--The result of this query is all the duplicate records whose Id is greater.
select...
December 24, 2008 at 8:11 am
delete * from employee where id NOT IN (select min(id) from employee group by employeeno,employeeid)
This will delete all duplicated records and leave one unduplicated record
RickO
December 24, 2008 at 7:20 am
Viewing 5 posts - 1 through 5 (of 5 total)