Skip to main content

LAST_QUERY_ID

Descriptionโ€‹

Get the query id of the current user's last query.

Syntaxโ€‹

LAST_QUERY_ID()

Return Valueโ€‹

Returns the query id of the current user's last query;

Examplesโ€‹

select last_query_id();
+-----------------------------------+
| last_query_id() |
+-----------------------------------+
| 128f913c3ec84a1e-b834bd0262cc090a |
+-----------------------------------+

Enter to send ยท Shift+Enter for a new line