Categories:

Context Functions (Session)

CURRENT_TRANSACTION

Returns the transaction id of an open transaction in the current session.

Syntax

CURRENT_TRANSACTION()

Arguments

None.

Examples

This shows the transaction ID of the current transaction:

SELECT CURRENT_TRANSACTION();

Output:

+-----------------------+
| CURRENT_TRANSACTION() |
|-----------------------|
| 1538951348887         |
+-----------------------+