Removes a data type from the database.
DROP DATATYPE datatype-name
It is recommended that you use DROP DOMAIN rather than DROP DATATYPE, as DROP DOMAIN is the syntax used in the ANSI/ISO SQL Standard. You cannot drop system-defined data types (such as MONEY or UNIQUEIDENTIFIERSTR) from a database.
You must be the owner of the data type, or have the DROP DATATYPE or DROP ANY OBJECT system privilege.
Automatic commit.
Domain support is optional ANSI/ISO SQL Language Feature F251. The DROP DATATYPE statement is not in the standard.
The following example creates and then drops a datatype called PhoneNum:
CREATE DATATYPE PhoneNum CHAR(12) NULL; DROP DATATYPE PhoneNum;