Printing to the command line

Printing to the standard output is a quick way of checking variable values and execution results at various points of code execution. When the method in the second line of the following Java code fragment is encountered, the string argument it accepts prints out to standard output.

String str = "Hello world";
System.out.println( str );

In SQL Anywhere, standard output is the database server messages window, so the string appears there. Executing the above Java code within the database is the equivalent of the following SQL statement.

MESSAGE 'Hello world';