Rudebox.co.nr How To Forums

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

Share | 
 

 Difference between ROW_NUMBER() and RANK() in MSSQL

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin
avatar

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

PostSubject: Difference between ROW_NUMBER() and RANK() in MSSQL   Sun 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
View user profile http://rudebox.editboard.com
 
Difference between ROW_NUMBER() and RANK() in MSSQL
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» ~The Elder Gods~ Rank 22
» Fighiting the first High Rank Rathalos - it still keeps on ticking even when limping
» High Rank Rathalos! Please Help!
» Armor choices from low to high rank (and bit of hammer 2)
» Any good low rank gunner sets?

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