Note that if the ordering isn’t unique, the ROW_NUMBER function is not deterministic.
- 5. Grouping and Windowing
- from Training Kit (Exam 70-461): Querying Microsoft® SQL Server® 2012
- Publisher: Microsoft Press
- Released: December 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.
Share this highlighthttp://www.safaribooksonline.com/a/training-kit-exam/61510/