This post shows the difference between RANK and DENSE_RANK.
Select DeptNo , Sal , RANK() OVER (Partition By DeptNo Order By Sal ) Rank , DENSE_RANK() OVER (Partition By DeptNo Order By Sal ) Dense From Emp Where DeptNo <> 20 Order By DeptNo, Rank;
Here you can see that RANK leaves a gap after a tie and DENSE_RANK does not.
Simple and concise explanation. Basically rank doesn't use consecutive numbers. Also a good post here:
ReplyDeletedense_rank and rank differences
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. rank tracker
ReplyDelete