Overview
Displays the columns contained in the partitioning key of all tenants' partition objects (partitioned tables and partitioned indexes).
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | Tenant ID |
| 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
Query the columns contained in the primary partitioning key of the partitioned table tbl2_f_rl for the tenant with ID 1002 under the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_PART_KEY_COLUMNS WHERE CON_ID=1002 AND NAME='tbl2_f_rl';
The query result is as follows:
+--------+----------+-----------+-------------+-------------+-----------------+--------------------+
| CON_ID | OWNER | NAME | OBJECT_TYPE | COLUMN_NAME | COLUMN_POSITION | COLLATED_COLUMN_ID |
+--------+----------+-----------+-------------+-------------+-----------------+--------------------+
| 1002 | infotest | tbl2_f_rl | TABLE | col1 | 1 | NULL |
+--------+----------+-----------+-------------+-------------+-----------------+--------------------+
1 row in set
References
For information about the columns contained in the partitioning key of a partition for the current tenant, see DBA_PART_KEY_COLUMNS.