Removes the Unique Constraint from the database
Remove-UniqueKey [-TableName] <String> [-SchemaName <String>] [-ColumnName] <String[]> [<CommonParameters>]
Remove-UniqueKey [-TableName] <String> [-SchemaName <String>] [-Name] <String> [<CommonParameters>]
Removes the Unique Constraint from the database.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
TableName | String | The name of the target table. |
true | false | |
SchemaName | String | The schema name of the target table. Defaults to |
false | false | dbo |
ColumnName | String[] | OBSOLETE. Use the |
true | false | |
Name | String | The name of the unique key to remove. |
true | false |
Remove-UniqueKey 'Cars' -Name 'YearUK'
Demonstrates how to remove a unique key whose name is different than the name Rivet derives for unique keys.