DROP SAVED QUERY

DROP_SAVED_QUERY drops a previously saved query.

Read more in the saved_queries guide.

See also: SAVE QUERY, EXECUTE SAVED QUERY, SHOW SAVED QUERY, LIST SAVED QUERIES.

Syntax

drop_saved_query_statement ::=
    SELECT DROP_SAVED_QUERY(saved_query_name)

saved_query_name ::= string_literal

Returns

If saved query is dropped successfully, returns nothing.

Parameters

Parameter

Description

saved_query_name

The name of the query to drop

Examples

Dropping a previously saved query

SELECT DROP_SAVED_QUERY('select_all');

Permissions

Dropping a saved query requires DDL permissions on the saved query and SELECT permissions to access the tables referenced in the query.