Drops a user-defined datatype.
sp_droptype typename
sp_droptype birthday
Executing sp_droptype deletes a user-defined datatype from systypes.
You cannot drop a user-defined datatype if it is referenced by tables or another database object.
See also User-Defined Datatypes in Reference Manual: Building Blocks.
The permission checks for sp_droptype differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be the datatype owner or a user with manage database privilege. |
Disabled | With granular permissions disabled, you must be datatype owner or database owner. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|