What is difference between RANK and DENSE_RANK.

 Posted by Bhakti on 11/23/2009 | Category: Sql Server Interview questions | Views: 8434

The main difference between RANK and DENSE_RANK comes when they leave gap among records while ranking them.

For an example, if you have three records at position one. Both the functions will place all three records at same position of one but the difference comes is when they rank the next record. RANK() will rank the next record as fourth record while DENSE_RANK() will rank it as second.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response