Contents IndexLOOP statement NULL value

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 43. Watcom-SQL Statements
      MESSAGE statement

Function

To display a message on the message window of the database engine or server.

Syntax

     MESSAGE expression, ...

Usage

Procedures, triggers, and batches.

Permissions

Must be connected to the database.

Side effects

None.

See also

Description

The MESSAGE statement displays an expression on the message window of the database engine or server (not on the client window). It is used primarily for debugging of procedures and triggers.

Valid expressions can include a 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.

Example

The following procedure displays a message on the engine message window:

     CREATE PROCEDURE message_test ()
     BEGIN
     MESSAGE 'The current date and time: ', Now();
     END

The statement

     CALL message_test()

displays the string The current date and time, and the current date and time, on the database engine message window.

Contents IndexLOOP statement NULL value