DROP LIVE VIEW

Permanently deletes a live view and all of its data. For a conceptual overview, see Live views.

Syntax

DROP LIVE VIEW
DROP LIVE VIEW [ IF EXISTS ] viewName

Parameters

ParameterDescription
viewNameName of the live view to drop
IF EXISTSSuppress the error if the view does not exist

Examples

Drop a live view
DROP LIVE VIEW trades_ma;
Drop only if it exists (no error if missing)
DROP LIVE VIEW IF EXISTS trades_ma;

Behavior

AspectDescription
PermanenceDeletion is permanent and not recoverable
Space reclamationDisk space is reclaimed asynchronously
Active queriesExisting read queries may delay space reclamation
PermissionsOn Enterprise, the view's access-control grants are removed with it
warning

This operation cannot be undone. The view and all of its precomputed data are permanently deleted.

Permissions (Enterprise)

Dropping a live view requires the DROP LIVE VIEW permission on the specific view:

Grant drop permission
GRANT DROP LIVE VIEW ON trades_ma TO user1;

The view creator automatically receives this permission with the GRANT option.

Errors

ErrorCause
live view name expectedThe name refers to a table or view that is not a live view
live view does not existThe view does not exist and IF EXISTS was not specified
permission deniedMissing DROP LIVE VIEW permission (Enterprise)

See also