Deletes a user-defined data type from systypes.
sp_droptype [@typename =] 'type'
0 (success) or 1 (failure)
None
The type user-defined data type cannot be dropped if tables or other database objects reference it.
Note A user-defined data type cannot be dropped if the user-defined data type is used within a table definition or if a rule or default is bound to it.
Execute permissions default to the members of the db_owner fixed database role and the data type owner.
This example drops the user-defined data type birthday.
Note This user-defined data type must already exist or this example returns an error message.
USE master
EXEC sp_droptype 'birthday'
sp_addtype | System Stored Procedures |
sp_rename |