CREATE MESSAGE statement [T-SQL]

Description

Adds a user-defined message to the SYSUSERMESSAGES system table for use by PRINT and RAISERROR statements.

Syntax

CREATE MESSAGE message-number
... AS 'message-text'

Usage

CREATE MESSAGE associates a message number with a message string. The message number can be used in PRINT and RAISERROR statements.

There is no parameter corresponding to the language argument for sp_addmessage.


Side effects

Automatic commit.

Standards

Permissions

Must have RESOURCE authority.

See also

PRINT statement [T-SQL]

RAISERROR statement [T-SQL]