---
title: "Discussion on \"ROW_NUMBER() vs RANK() vs DENSE_RANK()\" | Hashnode"
description: "Discussion on \"ROW_NUMBER() vs RANK() vs DENSE_RANK()\". The RANK, DENSE_RANK and ROW_NUMBER functions are used to return an increasing integer number. All of these three functions require the ORDER BY clause to function in the way intended. \nBefore explaining how these functions work, let's understand how..."
url: "https://hashnode.com/posts/rownumber-vs-rank-vs-denserank/637c13c0e9e23d082b18867f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [ROW\_NUMBER() vs RANK() vs DENSE\_RANK()](https://emilioeguia.hashnode.dev/rownumber-vs-rank-vs-denserank?utm_source=hashnode&utm_medium=feed)

The RANK, DENSE\_RANK and ROW\_NUMBER functions are used to return an increasing integer number. All of these three functions require the ORDER BY clause to function in the way intended. Before explaining how these functions work, let's understand how...

Nov 22, 2022 · 3 min read · emilioeguia.hashnode.dev  
Read the article

-   [#sql](https://hashnode.com/tag/sql)
-   [#sql-server](https://hashnode.com/tag/sql-server)
-   [#databases](https://hashnode.com/tag/databases)
-   [#computer-science](https://hashnode.com/tag/computer-science)
-   [#functions](https://hashnode.com/tag/functions)

## Written by

[Emilio Eguia](https://hashnode.com/@emilioeguia)

@emilioeguia

  
[View profile](https://hashnode.com/@emilioeguia)

Software Developer - Data Lover

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
