Purpose
This statement is used to drop a tablegroup. However, if any table's TABLEGROUP attribute references the target tablegroup, the tablegroup cannot be dropped.
Syntax
DROP TABLEGROUP [IF EXISTS] tablegroup_name
Parameters
| Parameter | Description |
|---|---|
| tablegroup_name | The name of the tablegroup. If the tablegroup does not exist and IF EXISTS is not specified, an error will occur. |
Examples
Drop a tablegroup named
Table_Group1.obclient> DROP TABLEGROUP Table_Group1;Drop a non-existent tablegroup
Table_Group1.obclient> DROP TABLEGROUP Table_Group1;Expected return result:
ERROR 5151 (42P01): tablegroup not existSpecify
IF EXISTSto drop a non-existent tablegroupTable_Group1.obclient> DROP TABLEGROUP IF EXISTS Table_Group1;
