Chapter 6 SQL Language Elements
255
Global variable Returns
started. In Adaptive Server Anywhere, returns 0
@@error Commonly used to check the error status (succeeded or
failed) of the most recently executed statement. It contains 0
if the previous transaction succeeded; otherwise, it contains
the last error number generated by the system. A statement
such as
if @@error != 0 return
causes an exit if an error occurs. Every statement resets
@@error, including PRINT statements or IF tests, so the
status check must immediately follow the statement whose
success is in question
@@identity Last value inserted into an IDENTITY column by an
INSERT or SELECT INTO statement.
$ For a description, see "@@identity global variable" on
page 257.
@@idle In Adaptive Server Enterprise, the amount of time, in ticks,
that Adaptive Server Enterprise has been idle since it was
last started. In Adaptive Server Anywhere, returns 0
@@io_busy In Adaptive Server Enterprise, the amount of time, in ticks,
that Adaptive Server Enterprise has spent doing input and
output operations since it was last started. In Adaptive
Server Anywhere, returns 0
@@isolation Current isolation level of the connection. In Adaptive Server
Enterprise, @@isolation takes the value of the active level
@@langid In Adaptive Server Enterprise, defines the local language ID
of the language currently in use. In Adaptive Server
Anywhere, returns 0
@@language In Adaptive Server Enterprise, defines the name of the
language currently in use. In Adaptive Server Anywhere,
returns "English"
@@maxcharlen In Adaptive Server Enterprise, maximum length, in bytes, of
a character in Adaptive Server Enterprise’s default character
set. In Adaptive Server Anywhere, returns 1
@@max_
connections
For the personal server, the maximum number of
simultaneous connections that can be made to the server,
which is 10
For the network server, the maximum number of active
clients (not database connections, as each client can support
multiple connections)
For Adaptive Server Enterprise, the maximum number of
connections to the server