Drops a user-defined datatype.
Remove-DataType [-SchemaName <String>] [-Name] <String> [<CommonParameters>]
Handles all three datatypes: alias, CLR, and table. If the datatype is in use, you'll get an error. Make sure to remove/alter any objects that reference the type first.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
SchemaName | String | The name of the type's schema. Default is |
false | false | dbo |
Name | String | The name of the datatype to drop. |
true | false |
Remove-DataType 'GUID'
Demonstrates how to remove the GUID
user-defined data type.
Remove-DataType -SchemaName 'rivet' 'GUID'
Demonstrates how to remove a datatype in a schema other than dbo
.