SET ROWCOUNT 1
delete from dbo.[User]
where ID IN (select id from dbo.[User]
group by(id) having(count(id) > 1))
WHILE @@rowcount > 0
BEGIN
delete from dbo.[User]
where ID IN (select id from dbo.[User]
group by(id) having(count(id) > 1))
END
SET ROWCOUNT 0
The above query is for deleting the duplicate records. It is working well.
I got this query from one of the site,
can any one explain this query how it executes.
Thanks
Ganesh Kumar