What is the basic difference between different types of Ranking functions?

Ranking functions

ROW_NUMBER: It just returns the sequence numbers starts from 1.

RANK: Returns the rank of each record in the current result set.

DENSE_RANK: It is same as Rank() function. But it returns without gaps in ranking.

Do not worry about these definitions :) Please look at the below data and respective ranks. You will be able to understand the actual difference between them.

Ranking Functions

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.