forum

Home / DeveloperSection / Forums / Remove/Delete duplicate values from table in SQL Server

Remove/Delete duplicate values from table in SQL Server

Anonymous User208016-May-2013
Hi Expert!

I want to delete all duplicate records in a table. My table as following 

CREATE TABLE tblVisitor
(
S_No INT IDENTITY PRIMARY KEY,
Visitor_ID INT,
Visitor_Name VARCHAR(50),
Visited_Date DATETIME 
)

Table with data

S_NoVisitor_IDVisitor_NameVisited Date

1101er. samuel fernandes2013-02-16 16:34:24.307
2102hugh jackman2013-03-06 16:34:24.307
3101er. samuel fernandes2013-03-11 16:34:45.157
4102hugh jackman2013-04-01 16:34:45.157
5101er. samuel fernandes2013-04-10 16:36:57.423
6102hugh jackman2013-04-18 16:36:57.423
7103brad pitt2013-04-28 16:36:57.423
8104lois waisbrooker2013-05-02 16:36:57.423
9105ezra heywood2013-05-13 16:36:57.423
10103brad pitt2013-05-16 16:36:57.423

Now I want to delete duplicate 'Visitor_ID' from tblVisitor 

Please help.
Thanks in advance! 

Updated on 16-May-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By