This table includes all Adaptive Server global variables that are supported in SAP Sybase IQ. Adaptive Server global variables that are not supported by SAP Sybase IQ are not included in the list.
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 might not be meaningful.
Global variable |
Returns |
---|---|
@@char_convert |
Returns 0. |
@@client_csname |
In Adaptive Server, the client’s character set name. Set to NULL if client character set has never been initialized; otherwise, contains the name of the most recently used character set. Returns NULL in SAP Sybase IQ. |
@@client_csid |
In Adaptive Server, the client’s character set ID. Set to -1 if client character set has never been initialized; otherwise, contains the most recently used client character set ID from syscharsets. Returns -1 in SAP Sybase IQ. |
@@connections |
The number of logins since the server was last started. |
@@cpu_busy |
In Adaptive Server, the amount of time, in ticks, that the CPU has spent performing Adaptive Server work since the last time Adaptive Server was started. In SAP Sybase IQ, returns 0. |
@@error |
Commonly used to check the error status (succeeded or failed) of the most recently executed statement. Contains 0 if the previous transaction succeeded; otherwise, 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 |
In Adaptive Server, the last value inserted into an IDENTITY column by an INSERT, LOAD, or SELECT INTO statement. @@identity is reset each time a row is inserted into a table. If a statement inserts multiple rows, @@identity reflects the IDENTITY value for the last row inserted. If the affected table does not contain an IDENTITY column, @@identity is set to 0. The value of @@identity is not affected by the failure of an INSERT or SELECT INTO statement, or the rollback of the transaction that contained the failed statement. @@identity retains the last value inserted into an IDENTITY column, even if the statement that inserted that value fails to commit. |
@@idle |
In Adaptive Server, the amount of time, in ticks, that Adaptive Server has been idle since the server was last started. In SAP Sybase IQ, returns 0. |
@@io_busy |
In Adaptive Server, the amount of time, in ticks, that Adaptive Server has spent performing input and output operations since the server was last started. In SAP Sybase IQ, returns 0. |
@@isolation |
Current isolation level of the connection. In Adaptive Server, @@isolation takes the value of the active level. |
@@langid |
In Adaptive Server, defines the local language ID of the language currently in use. In SAP Sybase IQ, returns 0. |
@@language |
In Adaptive Server, defines the name of the language currently in use. In SAP Sybase IQ, returns “English”. |
@@maxcharlen |
In Adaptive Server, maximum length, in bytes, of a character in the Adaptive Server default character set. In SAP Sybase IQ, returns 1. |
@@max_ connections |
For the network server, the maximum number of active clients (not database connections, as each client can support multiple connections). For Adaptive Server, the maximum number of connections to the server. |
@@ncharsize |
In Adaptive Server, average length, in bytes, of a national character. In SAP Sybase IQ, returns 1. |
@@nestlevel |
In Adaptive Server, nesting level of current execution (initially 0). Each time a stored procedure or trigger calls another stored procedure or trigger, the nesting level is incremented. In SAP Sybase IQ, returns -1. |
@@pack_received |
In Adaptive Server, number of input packets read by Adaptive Server since the server was last started. In SAP Sybase IQ, returns 0. |
@@pack_sent |
In Adaptive Server, number of output packets written by Adaptive Server since the server was last started. In SAP Sybase IQ, returns 0. |
@@packet_errors |
In Adaptive Server, number of errors that have occurred while Adaptive Server was sending and receiving packets. In SAP Sybase IQ, returns 0. |
@@procid |
Stored procedure ID of the currently executing procedure. |
@@servername |
Name of the local Adaptive Server or SAP Sybase IQ server. |
@@spid |
In Adaptive Server, server process ID number of the current process. In SAP Sybase IQ, the connection handle for the current connection. This is the same value as that displayed by the sa_conn_info procedure. |
@@sqlstatus |
Contains status information resulting from the last FETCH statement. @@sqlstatus may contain the following values:
|
@@thresh_hysteresis |
In Adaptive Server, change in free space required to activate a threshold. In SAP Sybase IQ, returns 0. |
@@timeticks |
In Adaptive Server, number of microseconds per tick. The amount of time per tick is machine-dependent. In SAP Sybase IQ, returns 0. |
@@total_errors |
In Adaptive Server, number of errors that have occurred while Adaptive Server was reading or writing. In SAP Sybase IQ, returns 0. |
@@total_read |
In Adaptive Server, number of disk reads by Adaptive Server since the server was last started. In SAP Sybase IQ, returns 0. |
@@total_write |
In Adaptive Server, number of disk writes by Adaptive Server since the server was last started. In SAP Sybase IQ, returns 0. |
@@tranchained |
Current transaction mode of the Transact-SQL program. @@tranchained returns 0 for unchained or 1 for chained. |
@@trancount |
Nesting level of transactions. Each BEGIN TRANSACTION in a batch increments the transaction count. |
@@transtate |
In Adaptive Server, current state of a transaction after a statement executes. In SAP Sybase IQ, returns -1. |
@@version |
Information about the current version of Adaptive Server or SAP Sybase IQ. |