602SQL Documentation Index  

System Variables

System variable are always accessible in SQL. Some of them have a defined value only in certain situations, e.g. when a specific action is complete or in an error handler. You can use the value of any system variable in SQL, but you can explicitly assign a new value only to some of these properties.

Each client has its own values of system variables.

Name Type Can be modified? Description
@@PLATFORM INT No Number of the server platform
@@ROWCOUNT INT No Number of inserted/modified/deleted rows with the last INSERT/UPDATE/DELETE statement
@@SQLOPTIONS INT Yes SQL compatibility attributes settings
@@WAITING INT Yes Time limit for waiting for freeing resources, in tenths of seconds
@@LAST_EXCEPTION CHAR(31) No Name of the last exception or sqlstate - details
SQLCODE INT No Number of the currently handled error
SQLSTATE CHAR(5) No Valid sqlstate - code of the error state
@@ERROR_MESSAGE CLOB No Text information about the last error
@@ROLLED_BACK BOOLEAN No A flag showing that last transaction was rolled back due to an error - details
@@FULLTEXT_POSITION INT No The occurrence of the word or phrase searched for in a document
@@FULLTEXT_WEIGHT INT No The fulltext weight of the word or phrase searched for in a document - not used in the current version.
@@ACTIVE_RI_IN_PROGRESS BOOLEAN No TRUE if there's some active referential integrity action underway
@@IDENTITY BIGINT No Last value get from a sequence or from a unique keys generator bound to a table (UNIQUE)