sqlserver 根据排序取相同值第一个

select * from (select * from(

select row_number() over(partition by Pid order by created desc) rowId,* from

table ) t

where rowId=1) tt

posted @   chang1234  阅读(2236)  评论(1编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示