| title | DROP MESSAGE TYPE (Transact-SQL) | |||||
|---|---|---|---|---|---|---|
| description | DROP MESSAGE TYPE (Transact-SQL) | |||||
| author | WilliamDAssafMSFT | |||||
| ms.author | wiassaf | |||||
| ms.date | 03/06/2017 | |||||
| ms.service | sql | |||||
| ms.subservice | t-sql | |||||
| ms.topic | reference | |||||
| f1_keywords |
|
|||||
| helpviewer_keywords |
|
|||||
| dev_langs |
|
[!INCLUDE SQL Server - ASDBMI]
Drops an existing message type.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
DROP MESSAGE TYPE message_type_name
[ ; ]
message_type_name
The name of the message type to delete. Server, database, and schema names cannot be specified.
Permission for dropping a message type defaults to the owner of the message type, members of the db_ddladmin or db_owner fixed database roles, and members of the sysadmin fixed server role.
You cannot drop a message type if any contracts refer to the message type.
The following example deletes the //Adventure-Works.com/Expenses/SubmitExpense message type from the database.
DROP MESSAGE TYPE [//Adventure-Works.com/Expenses/SubmitExpense] ; ALTER MESSAGE TYPE (Transact-SQL)
CREATE MESSAGE TYPE (Transact-SQL)
EVENTDATA (Transact-SQL)