用slq语句实现除去字段T中重复的项:ID T1 1-22 2-33 3-44 1-25 2-3
所要结果:ID T1 1-22 2-33 3-4 ===================================================
select a.id,a.t from Table_1 as a inner join(select id=min(id) from Table_1 group by t) as b on a.id=b.id
select * from Table_1 where ID in (select id=min(id) from Table_1 group by t)
两个sql都可以,关键是select id=min(id) from Table_1 group by t