Index.IsUnique Index.IsUnique Index.IsUnique Property

Definition

Gets or sets the Boolean property value that specifies whether the index is unique or not.

public:
 property bool IsUnique { bool get(); void set(bool value); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.ReadOnlyAfterCreation | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Standalone | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.SqlAzureDatabase | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Design | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Deploy)]
public bool IsUnique { get; set; }
Public Property IsUnique As Boolean
Property Value

A Boolean value that specifies whether the index is unique or not.

If True, the index is unique.

If False (default), the index is not unique.

Examples

Creating, Altering, and Removing Indexes

Remarks

This property cannot be modified by using the Alter method. To change the property, the index must be rebuilt or re-created.

Applies to