MSSQL row_number简单使用语法

select * from (

select row_number() over(partition by threadid order by date desc) r,threadid,username

from blogs  ) tppp

where tppp.r=1

tppp.r=1可以找出排重后按排序规则排名第一的数据。

相关文章:

  • 2022-02-08
  • 2021-08-20
  • 2021-10-12
  • 2022-12-23
  • 2022-02-18
  • 2021-05-05
  • 2021-06-16
猜你喜欢
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2021-07-03
相关资源
相似解决方案