代码改变世界

T-SQL 集锦

2012-03-16 16:04  河蟹社会  阅读(169)  评论(0编辑  收藏  举报
alter table SubscribeList add  id int identity(1,1)
select max(id) as id into #t from SubscribeList group by mail
delete from SubscribeList where id not in (select id from #t)
drop table #t
alter table SubscribeList drop column id

删除表中重复字段,保留一个.

襄阳弓长弓虽:t.sina.com/xyzhangqiang