use muonline
select accountid,count(accountid) as cnt into cfid from warehouse group by accountid
go
select accountid from cfid where cnt>1
go
drop table cfid
在查询分析器里运行上面这个看看你倒底有多少重复数据,并且可以看到同一帐号有多少条记录,就是那个cnt的值
要删除重复记录请使用下面的语句
use muonline
select accountid,count(accountid) as cnt into cfid from warehouse group by accountid
go
delete warehouse where accountid in (select accountid from cfid where cnt>1)
go
drop table cfid