sp_dropmessage (T-SQL)

Drops a specified error message from the sysmessages system table.

Syntax

sp_dropmessage [@msgnum =] message_number
    
[, [@lang =] 'language']

Arguments
[@msgnum =] message_number
Is the message number to drop. message_number must be a user-defined message with a message number greater than 50000. message_number is int, with a default of NULL.
[@lang =] 'language'
Is the language of the message to drop. If all is specified, all language versions of message_number are dropped. language is sysname, with a default of NULL.
Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Permissions

Execute permissions default to members of the sysadmin fixed server role.

Examples

This example drops the message (number 50001) from sysmessages.

USE master

EXEC sp_dropmessage 50001

  

Here is the result:

Message dropped.

  

See Also
CREATE TABLE sp_altermessage
RAISERROR System Stored Procedures
sp_addmessage  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.