ASP.NET - how to remove duplicate values in a column in sql

Asked By sri on 28-Sep-12 09:38 AM
how to remove duplicate values in a column in sql..?
Hemanth Kumar replied to sri on 29-Sep-12 01:46 AM
Hi Sri,


We can do this Removig Duplicate values from a Column in Many ways.I am giving one example based on my experience.If you want more Google the Question title.
http://www.mximize.com/how-to-find-duplicate-values-in-a-table-
Jitendra Faye replied to sri on 01-Oct-12 01:24 AM
Try to get record using distinct

like this-

select distinct colname  from  tanlename
Cos mos replied to sri on 01-Oct-12 04:59 AM

SELECT identity column(fid)
FROM table
GROUP BY fid
HAVING COUNT(*) > 1

and then 
SET ROWCOUNT 1
DELETE FROM table
WHERE fid = 1 AND fid = 1