Note
This view is introduced in version V4.0.0.
Purpose
This view displays the associations between tables in a tenant, including those in table groups. Tables not in any table group are not displayed.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLEGROUP_NAME | varchar(128) | NO | The name of the table group. |
| OWNER | varchar(128) | NO | The name of the database to which the table belongs. |
| TABLE_NAME | varchar(256) | NO | The name of the table. |
| SHARDING | varchar(10) | NO | The SHARDING attribute of the table group. The possible values are as follows:
|
Examples
Query the associations of the tblgroup1 table group in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_TABLEGROUP_TABLES WHERE tablegroup_name = 'tblgroup1';
The query result is as follows:
+-----------------+-----------+------------+----------+
| TABLEGROUP_NAME | OWNER | TABLE_NAME | SHARDING |
+-----------------+-----------+------------+----------+
| tblgroup1 | infotest | tbl1 | ADAPTIVE |
+-----------------+-----------+------------+----------+
1 row in set