Returns the ID for the most recently executed query in the current session.
LAST_QUERY_ID() → varchar
SELECT LAST_QUERY_ID() -- 1f1ae232-55c0-9df3-caa9-2c52deecf300
SELECT LAST_QUERY_ID -- 1f1ae232-55c0-9df3-caa9-2c52deecf300
This function can be called without the parentheses.
Was this page helpful?
Glad to hear it! Thank you for your feedback. Sorry to hear that. Thank you for your feedback.