> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# last_query_id

> 返回最近一次执行的查询的 ID。

返回最近一次执行的查询的 ID。

## 语法

```Haskell theme={null}
VARCHAR last_query_id();
```

## 参数说明

无。

## 返回值说明

返回 VARCHAR 类型的值。

## 示例

```Plain Text theme={null}
mysql> select last_query_id();
+--------------------------------------+
| last_query_id()                      |
+--------------------------------------+
| 7c1d8d68-bbec-11ec-af65-00163e1e238f |
+--------------------------------------+
1 row in set (0.00 sec)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.