Skip to content

Commit d57981f

Browse files
Merge pull request #36188 from WilliamDAssafMSFT/20260107-alter-index
20260107 update syntax sql
2 parents ed1377f + f806091 commit d57981f

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

docs/t-sql/statements/alter-index-transact-sql.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ Syntax for SQL Server, Azure SQL Database, and Azure SQL Managed Instance.
6363
```syntaxsql
6464
ALTER INDEX { index_name | ALL } ON <object>
6565
{
66-
REBUILD {
67-
[ PARTITION = ALL [ WITH ( <rebuild_index_option> [ , ...n ] ) ] ]
66+
REBUILD [
67+
[ WITH ( <rebuild_index_option> [ , ...n ] ) ]
68+
| [ PARTITION = ALL [ WITH ( <rebuild_index_option> [ , ...n ] ) ] ]
6869
| [ PARTITION = partition_number [ WITH ( <single_partition_rebuild_index_option> [ , ...n ] ) ] ]
69-
}
70+
]
7071
| DISABLE
7172
| REORGANIZE [ PARTITION = partition_number ] [ WITH ( <reorganize_option> ) ]
7273
| SET ( <set_index_option> [ , ...n ] )
@@ -147,10 +148,11 @@ Syntax for Azure Synapse Analytics and Analytics Platform System (PDW).
147148
ALTER INDEX { index_name | ALL }
148149
ON [ schema_name. ] table_name
149150
{
150-
REBUILD {
151-
[ PARTITION = ALL [ WITH ( <rebuild_index_option> ) ] ]
151+
REBUILD [
152+
[ WITH ( <rebuild_index_option> [ , ...n ] ) ]
153+
| [ PARTITION = ALL [ WITH ( <rebuild_index_option> ) ] ]
152154
| [ PARTITION = partition_number [ WITH ( <single_partition_rebuild_index_option> ) ] ]
153-
}
155+
]
154156
| DISABLE
155157
| REORGANIZE [ PARTITION = partition_number ]
156158
}

0 commit comments

Comments
 (0)