SQL Flow Field Guide

CREATE JSON INDEX

Catalog support for SQL Server 2025 (17.x)

defines 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

CREATE JSON INDEX name ON table_name (json_column_name) [ FOR ( sql_json_path [ , ...n ] ) ] [ WITH ( <json_index_option> [ , ...n ] ) ] [ ON { filegroup_name | "default" } ] [ ; ]

Work example

A SQL Server 2025 JSON workload needs an index for supported JSON path searches.

Check engine version, JSON column shape, indexed paths, and representative predicates before proposing the index.

Check your work The indexed paths match the query expressions and the target instance supports this feature.

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