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.
| Author |
Topic |
|
missMac
Posting Yak Master
124 Posts |
Posted - 2009-09-09 : 09:18:19
|
| Hello guys,how do i remove duplicate data in my table ?thanksmm |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-09 : 09:21:46
|
| Do Google it. You will find a lotMadhivananFailing to plan is Planning to fail |
 |
|
|
asgast
Posting Yak Master
149 Posts |
Posted - 2009-09-09 : 09:23:28
|
| you delete it :)how you delete depends on your structure, you should tell us more about the casethe simplest and the worst solution would be1 select distinct data into temporary table2 truncate original table3 insert data from temporary into original |
 |
|
|
missMac
Posting Yak Master
124 Posts |
Posted - 2009-09-09 : 09:38:07
|
| sorted. tnx |
 |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-09-10 : 00:16:48
|
| Hi, u can use this way alsodelete t( select row_number() over( partition by col order by col ) as rid from table ) twhere t.rid > 1 |
 |
|
|
|
|
|