Is there a way to add ROW_NUMBER() simply based on the default row order without using OVER (ORDER BY ...)?
Advertisement
Answer
There is no implicit ordering to rows in a table, it is a logical unordered set.
however you can do row_number() over (order by (select null))
As suggested by Itzik Ben-Gan from his book on window functions.