Note
This view is available starting with V4.0.0.
Overview
Displays the relationships between table groups and tables in the current tenant. Tables that are not part of a table group are not displayed.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TABLEGROUP_NAME | varchar(128) | NO | Table group name |
| OWNER | varchar(128) | NO | The name of the database to which the table belongs. |
| TABLE_NAME | varchar(256) | NO | Table name |
| SHARDING | varchar(10) | NO | SHARDING attributes of the table group:
|
| SCOPE | varchar(20) | NO | Table groupSCOPEAttribute. Valid values:
NoteFor V4.4.2, this field is available starting with V4.4.2 BP1. |
Sample query
The user tenant queries the association relationships of the table group named tblgroup2 within its own tenant.
obclient> SELECT * FROM oceanbase.DBA_OB_TABLEGROUP_TABLES WHERE tablegroup_name = 'tblgroup2';
The return result is as follows:
+-----------------+---------+------------+----------+--------+
| TABLEGROUP_NAME | OWNER | TABLE_NAME | SHARDING | SCOPE |
+-----------------+---------+------------+----------+--------+
| tblgroup2 | test_db | test_tbl3 | NONE | SERVER |
| tblgroup2 | test_db | test_tbl4 | NONE | SERVER |
+-----------------+---------+------------+----------+--------+
2 rows in set
