From ef5f2c3c78dd57f74dec356ba0575c1bdad433b6 Mon Sep 17 00:00:00 2001 From: Gabriel Donizeti Candido Date: Thu, 27 Aug 2026 02:03:10 -0300 Subject: [PATCH 1/2] Clarify ROWS/RANGE restriction applies to ROW_NUMBER This article (ROW_NUMBER) doesn't mention that the ROWS/RANGE clause of OVER can't be specified for this function, even though the same restriction applies. The RANK article states this explicitly. This change adds that clarification here to avoid ambiguity for readers. --- docs/t-sql/functions/row-number-transact-sql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/t-sql/functions/row-number-transact-sql.md b/docs/t-sql/functions/row-number-transact-sql.md index a70b5b1326b..545aae28241 100644 --- a/docs/t-sql/functions/row-number-transact-sql.md +++ b/docs/t-sql/functions/row-number-transact-sql.md @@ -50,7 +50,7 @@ ROW_NUMBER ( ) #### order_by_clause - The `ORDER BY` clause determines the sequence in which the rows are assigned their unique `ROW_NUMBER` within a specified partition. It is required. For more information, see [OVER Clause (Transact-SQL)](../queries/select-over-clause-transact-sql.md). + The `ORDER BY` clause determines the sequence in which the rows are assigned their unique `ROW_NUMBER` within a specified partition. It is required. The `` of the `OVER` clause can't be specified for the `ROW_NUMBER` function. For more information, see [OVER Clause (Transact-SQL)](../queries/select-over-clause-transact-sql.md). ## Return types From cf77c16384d377bf34083d6468ec8dc99d97774e Mon Sep 17 00:00:00 2001 From: Gabriel Donizeti Candido Date: Thu, 27 Aug 2026 15:04:45 -0300 Subject: [PATCH 2/2] Update docs/t-sql/functions/row-number-transact-sql.md Co-authored-by: Randolph West MSFT <97149825+rwestMSFT@users.noreply.github.com> --- docs/t-sql/functions/row-number-transact-sql.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/t-sql/functions/row-number-transact-sql.md b/docs/t-sql/functions/row-number-transact-sql.md index 545aae28241..37a68e9284b 100644 --- a/docs/t-sql/functions/row-number-transact-sql.md +++ b/docs/t-sql/functions/row-number-transact-sql.md @@ -50,7 +50,10 @@ ROW_NUMBER ( ) #### order_by_clause - The `ORDER BY` clause determines the sequence in which the rows are assigned their unique `ROW_NUMBER` within a specified partition. It is required. The `` of the `OVER` clause can't be specified for the `ROW_NUMBER` function. For more information, see [OVER Clause (Transact-SQL)](../queries/select-over-clause-transact-sql.md). + The `ORDER BY` clause determines the sequence in which the rows are assigned their unique `ROW_NUMBER` within a specified partition. It is required. For more information, see [OVER Clause (Transact-SQL)](../queries/select-over-clause-transact-sql.md). + +> [!NOTE] +> You can't use `ROW` or `RANGE` from the `OVER` clause in the `ROW_NUMBER` function. ## Return types