SQL Flow Field Guide

ALTER TABLE index_option

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

changes an index; CREATE/ALTER REBUILD sorts and writes all rows of the key

What changes

Input
table or view columns (key, included, filter predicate)
Output or change
index structure (B-tree, columnstore, XML, spatial, JSON, vector, full-text)

Syntax at a glance

{ PAD_INDEX = { ON | OFF } | FILLFACTOR = fillfactor | IGNORE_DUP_KEY = { ON | OFF } | STATISTICS_NORECOMPUTE = { ON | OFF } | ALLOW_ROW_LOCKS = { ON | OFF } | ALLOW_PAGE_LOCKS = { ON | OFF } | OPTIMIZE_FOR_SEQUENTIAL_KEY = { ON | OFF } | SORT_IN_TEMPDB = { ON | OFF } | MAXDOP = max_degree_of_parallelism | DATA_COMPRESSION = { NONE | ROW | PAGE | COLUMNSTORE | COLUMNSTORE_ARCHIVE } [ ON PARTITIONS ( { ...

Work example

A table index option needs a measured setting change.

Check option scope, supported edition, workload, and rebuild requirement before applying the change.

Check your work The intended index reports the new option and the target query remains within its plan limit.

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