ODBC Server Reference Manual
Transact-SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
4-79
PRINT
PRINT
Use PRINT to return a user-defined message to the user’s application.
The PRINT statement has the following syntax:
"ascii-string"
is a character string, up to 255 characters, enclosed in double quotation marks (").
local-variable
is the name of a local variable. The variable must be of type CHAR or VARCHAR
and must be declared within the batch in which it is used.
global-variable
is the name of a global variable. The variable must be of type CHAR or VARCHAR
or automatically convertible to these types (such as @@version).
Examples
The following statement prints an ASCII string:
print "This is everyone in the EMPLOYEE table"
select * from employee
NonStop ODBC Server Compared With SQL Server
When used through the NonStop ODBC Server, PRINT does not differ from the SQL
Server implementation.
NonStop ODBC Server Compared With NonStop SQL/MP
NonStop SQL/MP does not have a statement that corresponds to PRINT.
ROLLBACK TRANSACTION
Use ROLLBACK TRANSACTION to roll back all changes to the database that
occurred since the last BEGIN TRANSACTION statement was executed.
The ROLLBACK TRANSACTION statement has the following syntax:
PRINT { "ascii-string" }
{ @local-variable }
{ @@global-variable }
ROLLBACK TRAN[SACTION] [transaction-name ]
[savepoint-name ]