How do I use ROW_NUMBER()?

前端 未结 13 2379
青春惊慌失措
青春惊慌失措 2020-11-28 02:35

I want to use the ROW_NUMBER() to get...

  1. To get the max(ROW_NUMBER()) --> Or i guess this would also be the count of all rows
相关标签:
13条回答
  • 2020-11-28 03:32

    May not be related to the question here. But I found it could be useful when using ROW_NUMBER -

    SELECT *,
    ROW_NUMBER() OVER (ORDER BY (SELECT 100)) AS Any_ID 
    FROM #Any_Table
    
    0 讨论(0)
提交回复
热议问题