mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
1.9 KiB
1.9 KiB
slug | sidebar_position | sidebar_label |
---|---|---|
/zh/sql-reference/statements/drop | 44 | DROP |
DROP语法
删除现有实体。 如果指定了IF EXISTS
子句,如果实体不存在,这些查询不会返回错误。
DROP DATABASE
删除db
数据库中的所有表,然后删除db
数据库本身。
语法:
DROP DATABASE [IF EXISTS] db [ON CLUSTER cluster]
DROP TABLE
删除数据表
语法:
DROP [TEMPORARY] TABLE [IF EXISTS] [db.]name [ON CLUSTER cluster]
DROP DICTIONARY
删除字典。
语法:
DROP DICTIONARY [IF EXISTS] [db.]name
DROP USER
删除用户.
语法:
DROP USER [IF EXISTS] name [,...] [ON CLUSTER cluster_name]
DROP ROLE
删除角色。删除的角色将从分配给它的所有实体中撤消。
语法:
DROP ROLE [IF EXISTS] name [,...] [ON CLUSTER cluster_name]
DROP ROW POLICY
删除行策略。 删除的行策略从分配到它的所有实体中撤消。
语法:
DROP [ROW] POLICY [IF EXISTS] name [,...] ON [database.]table [,...] [ON CLUSTER cluster_name]
DROP QUOTA
Deletes a quota. The deleted quota is revoked from all the entities where it was assigned.
语法:
DROP QUOTA [IF EXISTS] name [,...] [ON CLUSTER cluster_name]
DROP SETTINGS PROFILE
删除配置文件。 已删除的设置配置文件将从分配给它的所有实体中撤销。
语法:
DROP [SETTINGS] PROFILE [IF EXISTS] name [,...] [ON CLUSTER cluster_name]
DROP VIEW
删除视图。 视图也可以通过DROP TABLE
命令删除,但DROP VIEW
会检查[db.]name
是否是一个视图。
语法:
DROP VIEW [IF EXISTS] [db.]name [ON CLUSTER cluster]