I want to use the ROW_NUMBER() to get...
ROW_NUMBER()
max(ROW_NUMBER())
May not be related to the question here. But I found it could be useful when using ROW_NUMBER -
ROW_NUMBER
SELECT *, ROW_NUMBER() OVER (ORDER BY (SELECT 100)) AS Any_ID FROM #Any_Table