1.distincttable
select distinct name from 表 select
2.group bytab
select name from 表 group by namedi
3.創建臨時表 newtable new
select * into newtable
from [user] where isdel=0 select * from newtable where id in (select max(id)
from newtable group by name)
drop table newtableab