From a35f0043dfaaf549e93449a1f09f4ccc4b42f89d Mon Sep 17 00:00:00 2001 From: HugoKornelis Date: Mon, 3 Aug 2026 16:35:45 +0200 Subject: [PATCH] Enhance documentation on FAST_FORWARD cursor behavior Clarified behavior of FAST_FORWARD cursors and their runtime choices. Added a link for additional background on SQL Server fast-forward server cursors. --- docs/t-sql/language-elements/declare-cursor-transact-sql.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/t-sql/language-elements/declare-cursor-transact-sql.md b/docs/t-sql/language-elements/declare-cursor-transact-sql.md index 60c9f9ba040..9b891971752 100644 --- a/docs/t-sql/language-elements/declare-cursor-transact-sql.md +++ b/docs/t-sql/language-elements/declare-cursor-transact-sql.md @@ -142,6 +142,10 @@ Specifies a `FORWARD_ONLY`, `READ_ONLY` cursor with performance optimizations en > [!NOTE] > Both `FAST_FORWARD` and `FORWARD_ONLY` can be used in the same `DECLARE CURSOR` statement. +A `FAST_FORWARD` cursor can either behave as a `STATIC` cursor or as a 'DYNAMIC' cursor. This choice is made at run time, depending on estimated costs, and the choice can change between executions. Since this choice affects whether concurrent modifications are visible to the cursor or not, such a run time change might impact your results. If your application requires that concurrent updates are visible, use a `DYNAMIC` or `KEYSET` cursor instead. If your application requires that concurrent updates are not visible, use a `STATIC` cursor instead. + +For some more background, see https://techcommunity.microsoft.com/blog/sqlserver/understanding-sql-server-fast-forward-server-cursors/383556. + #### READ_ONLY Prevents updates made through this cursor. The cursor can't be referenced in a `WHERE CURRENT OF` clause in an `UPDATE` or `DELETE` statement. This option overrides the default capability of a cursor to be updated.