- Categories:
System functions (System Control)
SYSTEM$CANCEL_ QUERY¶
如果指定的查询(或语句)当前处于活跃/运行状态,则取消该查询(或语句)。
- See also:
语法
实参
query_idIdentifier for the query to cancel. To obtain the ID for a query executed within the last 14 days, log into the web interface and go to the History
page.
使用说明
-
A user can cancel their own running SQL operations using this SQL function. Canceling running operations executed by another user requires a role with one of the following privileges:
- 执行操作用户的 OWNERSHIP。
- 运行操作的仓库的 OPERATE 或 OWNERSHIP(如果适用)。
- ACCOUNTADMIN 角色。
-
For a query run by a task, canceling running operations requires a role with one of the following privileges:
- 运行操作的任务的 OPERATE 或 OWNERSHIP。
- ACCOUNTADMIN 角色。
-
Snowflake 查询 IDs 是带有连字符的 UUID 文本字符串,连字符是特殊字符,因此必须通过使用单引号对字符串进行转义。
-
此函数不用于取消对特定仓库或用户的查询。请改用: