日期:2014-05-18 浏览次数:20645 次
select * from (select no=row_number() over(partition by name order by getdate()),* from tb) t where no=1
------解决方案--------------------
select * from (select *,ROW_NUMBER() over(PARTITION by name order by id) id from [tbl_a] ) a where a.id=1