日期:2014-05-17 浏览次数:20449 次
select Guid,Name,Tel
from
(
select *,rn=ROW_NUMBER() OVER(partition by Guid ORDER BY getdate()) from tb
)t
where rn=1
select [Guid],Name,Tel
from
(
select *,ROW_NUMBER() OVER(partition by Guid ORDER BY getdate()) num from tb
)A
where num=1