PRINT (TSQL Statement)

sends the arguments to the client.

Syntax

PRINT expression_1 [, ...expression_N]

Arguments

expression_1 … expression_N
list of expressions, of any type.

Remarks

It is the responsibility of the client program to display the values sent by PRINT as it sees fit.

With rcli, the print_mode option in the rcli.conf configuration file or passed as command line flag specifies the output format.

Examples

DECLARE @a INT = 34;

PRINT 123.4 * 64.5 / (3627.0 / @a )

PRINT 123, 45, 6

The result is:

74.611579818032
123 45 6

With rcli -print_mode=1 example.sql, the result is:

74.611579818032
        123|         45|          6|
RSQL, a simple alternative to Microsoft SQL Server