Rudebox.co.nr How To Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Rudebox.co.nr How To Forums

Rudebox How To Forums - Ask Anything, View How To's
 
HomeSearchLatest imagesRegisterLog in

 

 Difference between ROW_NUMBER() and RANK() in MSSQL

Go down 
AuthorMessage
Admin
Admin
Admin


Number of posts : 216
Registration date : 2007-01-01

Difference between ROW_NUMBER() and RANK() in MSSQL Empty
PostSubject: Difference between ROW_NUMBER() and RANK() in MSSQL   Difference between ROW_NUMBER() and RANK() in MSSQL Icon_minitimeSun Aug 30, 2009 7:59 pm

Contrary to popular belief, RANK() does not sort rows based upon how bad they smell. RANK() does much the same thing as ROW_NUMBER(), only it acknowledges ties in the columns specified in the ORDER BY clause, and assigns them the same rank. Where a tie occurs (as was the case for orders 6/3, and 1/5/Cool, the numbers that would otherwise have been “used up” are skipped, and numbering resumes at the next available number. As you can see, RANK() leaves a gap whenever there is a tie.

For more info and examples about this visit
http://digg.com/u3BhxP
Back to top Go down
https://rudebox.editboard.com
 
Difference between ROW_NUMBER() and RANK() in MSSQL
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Rudebox.co.nr How To Forums :: How To - Programming-
Jump to: