Imagine you had created a custom data type for your database:
Code
USE Northwind;
GO
CREATE TYPE NaturalNumber FROM int;
GOIf you don't need such a data type any more, to assist you with removing it, Transact-SQL provides thesp_droptype. Its syntax is:
Code
sp_droptype [ @typename= ] 'type'This procedure takes one argument as the name of the custom data type you want to delete. Here is an example of executing it:
Code
sp_droptype NaturalNumber;
GOCode


Join the conversation! Your thoughts help the community grow.