SQL语句取某一字段的唯一性

2024-12-29 16:09:45
推荐回答(1个)
回答1:

select a,max(b) from a group by a
或者
select a1.a,b from a as a1 where b = (select top 1 b from a where a.a = a1.a)