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