Difference between Rank and DENSE_RANK


Difference between Rank and DENSE_RANK

Here When you Check with Rank If we get Same Rank for two Members it will Skip the Sequence and show the Alternate Number
Here When you Check with Dense Rank If we get Same Rank for two Members it will Display the Sequence Number
From Below Query You can find the Difference of Rank and Dense

SELECT empno,
       ename,
       sal,
       RANK () OVER (ORDER BY sal DESC) RANK,
       DENSE_RANK () OVER (ORDER BY sal DESC) DENSE_RANK
  FROM scott.emp;

Comments

Popular posts from this blog

Deleting the Sourcing Rule Assignments API

BarCode with XML Publisher