select *
from table
where (a in
(select a
from table
group by a
having count(*) > 1))
order by a dese
from table
where (a in
(select a
from table
group by a
having count(*) > 1))
order by a dese
where newfield not in(
select min(newfield) from 表 group by 除newfield外的所有字段
)alter table 表 drop column newfield----------------------------------------------------
select * into #temp from 表 group by 所有列
truncate table 表
insert 表 select * from #temp
drop table #temp
-----------------------------------------