DROP Statements 

Deletes existing entity. If IF EXISTS clause is specified, these queries doesn’t return an error if the entity doesn’t exist.

DROP DATABASE 

DROP DATABASE [IF EXISTS] db [ON CLUSTER cluster]

Deletes all tables inside the db database, then deletes the ‘db’ database itself.

DROP TABLE 

DROP [TEMPORARY] TABLE [IF EXISTS] [db.]name [ON CLUSTER cluster]

Deletes the table.

DROP DICTIONARY 

DROP DICTIONARY [IF EXISTS] [db.]name

Deletes the dictionary.

DROP USER 

DROP USER [IF EXISTS] name [,...] [ON CLUSTER cluster_name]

Deletes a user.

DROP ROLE 

DROP ROLE [IF EXISTS] name [,...] [ON CLUSTER cluster_name]

Deletes a role.

Deleted role is revoked from all the entities where it was assigned.

DROP ROW POLICY 

DROP [ROW] POLICY [IF EXISTS] name [,...] ON [database.]table [,...] [ON CLUSTER cluster_name]

Deletes a row policy.

Deleted row policy is revoked from all the entities where it was assigned.

DROP QUOTA 

DROP QUOTA [IF EXISTS] name [,...] [ON CLUSTER cluster_name]

Deletes a quota.

Deleted quota is revoked from all the entities where it was assigned.

DROP SETTINGS PROFILE 

DROP [SETTINGS] PROFILE [IF EXISTS] name [,...] [ON CLUSTER cluster_name]

Deletes a settings profile.

Deleted settings profile is revoked from all the entities where it was assigned.

DROP VIEW 

DROP VIEW [IF EXISTS] [db.]name [ON CLUSTER cluster]

Deletes a view. Views can be deleted by a DROP TABLE command as well but DROP VIEW checks that [db.]name is a view.

Rating: 4 - 1 votes

Was this content helpful?
★★★★☆