Removes a check constraint from a table.
Remove-CheckConstraint [-TableName] <String> [-SchemaName <String>] [-Name] <String> [<CommonParameters>]
The Remove-CheckConstraint
operation removes a check constraint from a table. Check constraints add validation for data in columns.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
TableName | String | The name of the check constraint's table. |
true | false | |
SchemaName | String | The schema of the table. Default is |
false | false | dbo |
Name | String | The name of the check constraint to remove. |
true | false |
Remove-CheckConstraint 'Migrations' 'CK_Migrations_MigrationID'
Demonstrates how to remove a check constraint from a table. In this case, the CK_Migrations_MigrationID
constraint will be removed from the Migrations
table.