Index.Alter Index.Alter Index.Alter Method

Definition

Updates any Index object property changes on the instance of SQL Server.

Overloads

Alter() Alter() Alter()

Updates any Index object property changes on the instance of SQL Server.

Alter(IndexOperation) Alter(IndexOperation) Alter(IndexOperation)

Updates any Index object property changes on the instance of SQL Server for a specified index operation.

Alter() Alter() Alter()

Updates any Index object property changes on the instance of SQL Server.

public:
 virtual void Alter();
public void Alter ();
Public Sub Alter ()

Examples

Creating, Altering, and Removing Indexes

Remarks

The Alter method updates any changes that have been made to the Index object's properties since the Index object was created or since the last Alter statement. The modifications are combined and sent to the instance of SQL Server in a single network trip to the instance of SQL Server.

Note

Indexes based on the UserDefinedTableType object cannot be modified. Running this method will generate an exception.

Alter(IndexOperation) Alter(IndexOperation) Alter(IndexOperation)

Updates any Index object property changes on the instance of SQL Server for a specified index operation.

public:
 void Alter(Microsoft::SqlServer::Management::Smo::IndexOperation operation);
public void Alter (Microsoft.SqlServer.Management.Smo.IndexOperation operation);
Public Sub Alter (operation As IndexOperation)
Parameters
operation
IndexOperation IndexOperation IndexOperation

An IndexOperation object value that specifies the index operation that can be altered.

Examples

Creating, Altering, and Removing Indexes

Remarks

The Alter method updates any changes that have been made to the properties of the Index object since the Index object was created, or since the last Alter statement. The modifications are combined and sent to the instance of SQL Server in a single network trip to the instance of SQL Server.

Note

Indexes based on the UserDefinedTableType object cannot be modified and running this method will generate an exception.

Applies to