1 select * from( 2 select *,ROW_NUMBER() over(partition by RecordNum order by ID desc)as newrow from T_COM_UserTempModule) as temp where newrow=1 order by ID desc
RecordNum 有一个或多个相同的值,其他所有的列,都要返回,根据排序为降序。
2022-03-12 00:54:02
1 select * from( 2 select *,ROW_NUMBER() over(partition by RecordNum order by ID desc)as newrow from T_COM_UserTempModule) as temp where newrow=1 order by ID desc
RecordNum 有一个或多个相同的值,其他所有的列,都要返回,根据排序为降序。