RANK and DENSE_RANK

RANK() : function always returns sequential order for each record.
DENSE_RANK() : It returns continuous order for each record.

SELECT empno,
       deptno,
       sal,
       mgr,
       RANK () OVER (PARTITION BY deptno ORDER BY sal) "rank",
       DENSE_RANK() OVER (PARTITION BY deptno ORDER BY sal) "dense rank"    
  FROM emp;