zwei1121

博客园 首页 新随笔 联系 订阅 管理

alter table SendMailList
add key_col int not null identity(1,1)
go
delete from SendMailList
where exists
(
select * from SendMailList as t2
where t2.EMail=SendMailList.EMail
and t2.key_col>SendMailList.key_col
)
go
alter table SendMailList
drop column key_col

 


delete from SendMailList
where exists
(
select * from SendMailList as t2
where t2.EMail=SendMailList.EMail
and t2.id>SendMailList.id
)

posted on 2009-04-24 17:40  zwei  阅读(132)  评论(0编辑  收藏  举报