Categories:

Context Functions (Session)

CURRENT_STATEMENT¶

Returns the SQL text of the statement that is currently executing.

Syntax¶

CURRENT_STATEMENT()
Copy

Arguments¶

None.

Examples¶

This shows a simple example of using the CURRENT_STATEMENT function:

SELECT 2.71, CURRENT_STATEMENT();
Copy

Output:

+------+-----------------------------------+
| 2.71 | CURRENT_STATEMENT()               |
|------+-----------------------------------|
| 2.71 | SELECT 2.71, CURRENT_STATEMENT(); |
+------+-----------------------------------+
Copy