SAP ASE version 16.0 add global variables.
Global Variable | Description |
---|---|
@@trigger_name | Returns the name of the trigger currently executing. |
@@tranrollback | Returns the type of rollback encountered, if any. If the return value is:
SAP ASE does not change a negative value for
@@tranrollback until the next rollback
tran or commit tran is issued, indicating
that the session has encountered an implicit transaction rollback. SAP ASE
resets the value for @@tranrollback to 0 once it
successfully applies the next rollback tran or
commit tran. The value for
@@tranrollback is 0 at the end of this
example:
set chained on go <... Execute a DML statement ...> if (@@error != 0) and (@@tranrollback < 0) begin rollback tran end go |