SQL Flow Field Guide

TABLE HINT FORCESCAN

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

Specifies that the query optimizer uses only an index scan operation as the access path to the referenced table or view.

What changes

Input
none
Output or change
none

Syntax at a glance

WITH ( FORCESCAN )

Work example

A measured plan issue may justify investigating TABLE HINT FORCESCAN for one known query shape.

Save the actual plan and runtime metrics first. Test representative parameter values and remove the hint if the plan no longer fits.

Check your work TABLE HINT FORCESCAN. The plan property affected by TABLE HINT FORCESCAN changes as intended and reads, duration, and result rows remain acceptable.

Open Microsoft Learn for full syntax, permissions, and details for your version.