O'Reilly logo
  • Dustin Waybright thinks this is interesting:

Note that if the ordering isn’t unique, the ROW_NUMBER function is not deterministic.


Cover of Training Kit (Exam 70-461): Querying Microsoft® SQL Server® 2012


If the ROW_NUMBER ORDER BY clause allows for duplicate values, there is no guarantee which value gets assigned a row number first. To create a deterministic row number on the set, specify additional ORDER BY elements that lead to unique rows.