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 |