LAST_QUERY_ID

Returns the last query ID of query in current session, index can be (-1, 1, 1+2)..., out of range index will return empty string.

Analyze Syntax

func.last_query_id(<index>)

Analyze Examples

func.last_query_id(-1)

┌──────────────────────────────────────┐
    func.last_query_id((- 1))         
├──────────────────────────────────────┤
 a6f615c6-5bad-4863-8558-afd01889448c 
└──────────────────────────────────────┘

SQL Syntax

LAST_QUERY_ID(<index>)

SQL Examples

SELECT LAST_QUERY_ID(-1);

┌──────────────────────────────────────┐
         last_query_id((- 1))         
├──────────────────────────────────────┤
 a6f615c6-5bad-4863-8558-afd01889448c 
└──────────────────────────────────────┘
Last modified April 22, 2024 at 7:30 PM EST: updated context functions (14d970e)