Overview
Displays the columns contained in the partitioning key of all partitions in the current 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
In the sys tenant, query the columns contained in the partitioning key of the partitioned table tbl2_f_rl within this tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_PART_KEY_COLUMNS WHERE NAME='tbl2_f_rl';
The query result is as follows:
+-------+-----------+-------------+-------------+-----------------+--------------------+
| OWNER | NAME | OBJECT_TYPE | COLUMN_NAME | COLUMN_POSITION | COLLATED_COLUMN_ID |
+-------+-----------+-------------+-------------+-----------------+--------------------+
| test | tbl2_f_rl | 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.