MESSAGE statement
568
MESSAGE statement
Use this statement to display a message.
MESSAGE
expression
, …
[ TYPE { INFO | ACTION | WARNING | STATUS } ]
[ TO { CONSOLE | CLIENT | LOG }]
None.
None.
"CREATE PROCEDURE statement" on page 453
The MESSAGE statement displays a message, which can be any expression.
Clauses can specify where the message appears.
Valid expressions can include a quoted string or other constant, variable, or
function. However, queries are not permitted in the output of a Message
statement even though the definition of an expression includes queries.
TYPE clause The TYPE clause only has an effect if the message is sent to
the client. The client application must decide how to handle the message.
Interactive SQL displays messages in the following locations:
♦
INFO The Message window. INFO is the default type.
♦
ACTION A Message box with an OK button.
♦
WARNING A Message box with an OK button.
♦
STATUS The Message window.
TO clause This clause specifies the destination of a message:
♦
CONSOLE Send messages to the database server window. CONSOLE
is the default.
♦
CLIENT Send messages to the client application. Your application
must decide how to handle the message, and you can use the TYPE as
information on which to base that decision.
♦
LOG Send messages to the server log file specified by the -o
command-line option.
♦
SQL/92 Vendor extension.
♦
Sybase Not supported in Adaptive Server Enterprise. The Transact-
SQL PRINT statement provides a similar feature, and is also available in
Adaptive Server Anywhere.
Function
Syntax
Permissions
Side effects
See also
Description
Parameters
Standards and
compatibility
Example