--- title: "ALTER INDEX (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: 08/21/2019 ms.prod: sql ms.prod_service: "database-engine, sql-database, sql-data-warehouse, pdw" ms.reviewer: "" ms.technology: t-sql ms.topic: "language-reference" f1_keywords: - "ALTER INDEX" - "ALTER_INDEX_TSQL" dev_langs: - "t-sql" helpviewer_keywords: - "indexes [SQL Server], reorganizing" - "ALTER INDEX statement" - "indexes [SQL Server], disabling" - "online index operations" - "index reorganization [SQL Server]" - "ALLOW_ROW_LOCKS option" - "ALL keyword" - "reorganizing indexes" - "constraints [SQL Server], indexes" - "row locks [SQL Server]" - "index rebuilding [SQL Server]" - "rebuilding indexes" - "locking [SQL Server], indexes" - "partitioned indexes [SQL Server], rebuilding" - "defragmenting indexes" - "disabling indexes" - "XML indexes [SQL Server], modifying" - "index modifications [SQL Server]" - "indexes [SQL Server], modifying" - "index options [SQL Server]" - "modifying indexes" - "index disabling [SQL Server]" - "MAXDOP index option, ALTER INDEX statement" - "spatial indexes [SQL Server], modifying" - "indexes [SQL Server], options" - "ALLOW_PAGE_LOCKS option" - "page locks [SQL Server]" - "index rebuild [SQL Server]" - "index reorganize [SQL Server]" ms.assetid: b796c829-ef3a-405c-a784-48286d4fb2b9 author: pmasl ms.author: carlrab monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # ALTER INDEX (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-all-md](../../includes/tsql-appliesto-ss2008-all-md.md)] Modifies an existing table or view index (rowstore, columnstore, or XML) by disabling, rebuilding, or reorganizing the index; or by setting options on the index. ![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## Syntax ``` -- Syntax for SQL Server and Azure SQL Database ALTER INDEX { index_name | ALL } ON { REBUILD { [ PARTITION = ALL ] [ WITH ( [ ,...n ] ) ] | [ PARTITION = partition_number [ WITH ( ) [ ,...n ] ] } | DISABLE | REORGANIZE [ PARTITION = partition_number ] [ WITH ( ) ] | SET ( [ ,...n ] ) | RESUME [WITH (,[...n])] | PAUSE | ABORT } [ ; ] ::= { { database_name.schema_name.table_or_view_name | schema_name.table_or_view_name | table_or_view_name } } ::= { PAD_INDEX = { ON | OFF } | FILLFACTOR = fillfactor | SORT_IN_TEMPDB = { ON | OFF } | IGNORE_DUP_KEY = { ON | OFF } | STATISTICS_NORECOMPUTE = { ON | OFF } | STATISTICS_INCREMENTAL = { ON | OFF } | ONLINE = { ON [ ( ) ] | OFF } | RESUMABLE = { ON | OFF } | MAX_DURATION =