Overview
Displays the columns contained in the partitioning key of all partitions in the tenant.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| OWNER | varchar(128) | NO | Owner of a partitioned table or partitioned index |
| NAME | varchar(128) | NO | The name of the partitioned table or partitioned index. |
| OBJECT_TYPE | varchar(5) | NO | Type of the partition object:
|
| COLUMN_NAME | text | NO | Column name |
| COLUMN_POSITION | bigint(20) | NO | Position in the Partitioning Key |
| COLLATED_COLUMN_ID | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
Sample query
The user tenant queries the columns contained in the partitioning key of the partitioned table tbl1_h within its own tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_PART_KEY_COLUMNS WHERE NAME='tbl1_h';
The query result is as follows:
+----------+--------+-------------+-------------+-----------------+--------------------+
| OWNER | NAME | OBJECT_TYPE | COLUMN_NAME | COLUMN_POSITION | COLLATED_COLUMN_ID |
+----------+--------+-------------+-------------+-----------------+--------------------+
| infotest | tbl1_h | TABLE | col1 | 1 | NULL |
+----------+--------+-------------+-------------+-----------------+--------------------+
1 row in set
References
For information about the columns contained in the partitioning key of all partitions for all tenants, see CDB_PART_KEY_COLUMNS.