Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 single delete sql statement

Author  Topic 

sanjnep
Posting Yak Master

191 Posts

Posted - 2005-08-02 : 15:47:22
Hi All,
Again interview question. Is it possible to remove duplicate values from a single column table using single delete statement?
For example
data
---------
1
1
2
2
2
3
4
4
4
4

I need to delete the data from the table and following data should remain on the table.
data
--------
1
2
3
4

Thanks
Have a nice time


Sanjeev shrestha

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-08-02 : 15:52:51
Always check the SQLTeam.com articles and search the forums.

http://www.sqlteam.com/item.asp?ItemID=3331

Tara
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-03 : 00:58:17
One more link
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q139444

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -