DBASK KNOWLEDGE BASEDOC
DROP TABLEGROUP-V4.4.1-OceanBase 数据库文档-分布式数据库使用文档
描述
该语句用来删除表组。但是如果有任何表的 TABLEGROUP 属性引用了目标表组,则该表组不允许被删除。
语法
DROP TABLEGROUP [IF EXISTS] tablegroup_name;参数解释
| 参数 | 描述 |
|---|---|
| tablegroup\_name | 表组名称。如果要删除的表组名称不存在,并且没有指定 IF EXISTS,则会出现错误。 |
示例
* 删除名为 Table_Group1 的表组。
obclient> DROP TABLEGROUP Table_Group1;
Query OK, 0 rows affected* 删除不存在的表组 Table_Group1。
obclient> DROP TABLEGROUP Table_Group1;
ERROR 5151 (42P01): tablegroup not exist* 指定 IF EXISTS,删除不存在的表组 Table_Group1。
obclient> DROP TABLEGROUP IF EXISTS Table_Group1;
Query OK, 0 rows affected, 1 warning