# Purpose

2024-03-05 01:54:27  Updated

Purpose

You can use this statement to drop a table group.

Notice

You cannot drop a table group that contains any table.

Syntax

DROP TABLEGROUP tablegroup_name;

Parameters

Parameter Description
tablegroup_name The name of the table group to be dropped.

Examples

Drop the tblgroup1 table group that contains a table.

  1. Directly drop the tblgroup1 table group. An error is returned.

    obclient> DROP TABLEGROUP tblgroup1;
    ORA-00600: internal error code, arguments: -4615, tablegroup is not empty
    
  2. View the table group information and remove the tbl1 table from the tblgroup1 table group.

    obclient> SHOW TABLEGROUPS;
    +-----------------------+---------------+---------------------+
    | TABLEGROUP_NAME       | TABLE_NAME    | DATABASE_NAME       |
    +-----------------------+---------------+---------------------+
    | TBLGROUP1             | TBL1          | SYS                 |
    +-----------------------+---------------+---------------------+
    1 rows in set
    
    obclient> ALTER TABLE tbl1 SET TABLEGROUP '';
    Query OK, 0 rows affected
    
  3. Drop the tblgroup1 table group.

    obclient> DROP TABLEGROUP tblgroup1;
    Query OK, 0 rows affected
    

Contact Us