select zid, cw, count(*) as gs into #temp from table group by zid,cw select * from #temp where gs>1 请教: 如何优化 不用临时表 谢谢