This is a document Template
 
Rank :
  • SELECT empno, ename ,sal, rank() over (order by sal)"Rank" from emp

Dense_Rank:

  • SELECT empno, ename ,sal, dense_rank() over (order by sal)"Rank" from emp
EMP table with three coulmns

Rank : Chewed up  the number rank for the succeeding  column or columns  having a tie with the proceeding one.

DENSE_RANK : The rank number would be shared among the rows rows having ties

 
Compared:

PostgreSQL: RANK