Variables
254
Variable name Meaning
@@procid
Stored procedure ID of the currently executing procedure.
@@rowcount
Number of rows affected by the last statement. The value of
@@rowcount should be checked immediately after the
statement.
Inserts, updates, and deletes set @@rowcount to the number
of rows affected.
With cursors, @@rowcount represents the cumulative
number of rows returned from the cursor result set to the
client, up to the last fetch request.
Unlike in Adaptive Server Enterprise, @@rowcount is not
reset to zero by any statement which does not affect rows,
such as an IF statement.
@@servername
Name of the current database server.
@@sqlstatus
Contains status information resulting from the last fetch
statement.
@@version
Version number of the current version of Adaptive Server
Anywhere.
The following list includes all Adaptive Server Enterprise global variables
supported in Adaptive Server Anywhere. Adaptive Server Enterprise global
variables not supported by Adaptive Server Anywhere are not included in the
list. In contrast to the above table, this list includes all global variables that
return a value, including those for which the value is fixed at NULL, 1, -1, or
0, and may not be meaningful.
Global variable Returns
@@char_convert Returns 0
@@client_csname In Adaptive Server Enterprise, the client’s character set
name. Set to NULL if client character set has never been
initialized; otherwise, it contains the name of the most
recently used character set. Returns NULL in Adaptive
Server Anywhere
@@client_csid In Adaptive Server Enterprise, the client’s character set ID.
Set to –1 if client character set has never been initialized;
otherwise, it contains the most recently used client character
set ID from syscharsets. Returns –1 in Adaptive Server
Anywhere
@@connections The number of logins since the server was last started
@@cpu_busy In Adaptive Server Enterprise, the amount of time, in ticks,
that the CPU has spent doing Adaptive Server Enterprise
work since the last time Adaptive Server Enterprise was
Compatibility