标签:blog http io ar sp on 数据 art log
--在sql2005下可以 ,sql2000不可以
create table tb(id int,name varchar(4))
insert tb select 1,‘aa‘
union all select 1,‘aa‘
union all select 2,‘bb‘
union all select 3,‘bb‘
union all select 4,‘cc‘
union all select 1,‘aa‘
union all select 4,‘cc‘
delete a from
(select id,name,rn=row_number() over(partition by id,name order by id) from tb) a where rn>1
select * from tb
原文:http://blog.csdn.net/hzvcan/article/details/4862927
标签:blog http io ar sp on 数据 art log
原文地址:http://www.cnblogs.com/haitao-fan/p/4157406.html