SQL Flow Field Guide

DBCC CHECKTABLE

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

DBCC CHECKTABLE: administrative check or maintenance

What changes

Input
database, table, index, cache or server state named in the command
Output or change
messages or result sets; maintenance forms change storage, caches or metadata

Syntax at a glance

DBCC CHECKTABLE ( table_name | view_name [ , { NOINDEX | index_id } | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ] ) [ WITH { [ ALL_ERRORMSGS ] [ , EXTENDED_LOGICAL_CHECKS ] [ , NO_INFOMSGS ] [ , TABLOCK ] [ , ESTIMATEONLY ] [ , { PHYSICAL_ONLY | DATA_PURITY } ] [ , MAXDOP = number_of_processors ] } ]

Work example

A consistency incident is isolated to one table or indexed view.

Check the object identity and dependencies, then run the focused check on a copy when practical.

Check your work The selected object has no reported allocation or structural error.

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