Document queryID and initialQueryID functions

Задокументировал две функции.
This commit is contained in:
Dmitriy 2021-08-21 13:47:06 +03:00
parent 7fe7103e53
commit 7887f3892b

View File

@ -2236,3 +2236,34 @@ defaultRoles()
Type: [Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md)).
## queryID {#query-id}
Returns the ID of the current query, which can be used instantly in other queries. Other parameters of a query can be extracted from the [system.query_log](../../operations/system-tables/query_log.md) table via `query_id`.
**Syntax**
``` sql
queryID()
```
**Returned value**
- The ID of the current query.
Type: [String](../../sql-reference/data-types/string.md)
## initialQueryID {#initial-query-id}
Returns the ID of the initial current query, which can be used instantly in other queries. Other parameters of a query can be extracted from the [system.query_log](../../operations/system-tables/query_log.md) table via `initial_query_id`.
**Syntax**
``` sql
initialQueryID()
```
**Returned value**
- The ID of the initial current query.
Type: [String](../../sql-reference/data-types/string.md)