Note
This view is available starting with V2.2.77.
Purpose
This view displays all columns of subpartition keys in all partitioned objects owned by the current user.
Applicability
This view is available only in OceanBase Database in Oracle mode.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| NAME | VARCHAR2(128) | NO | The name of the partitioned table or partitioned index. |
| OBJECT_TYPE | CHAR(5) | NO | The type of the partitioned object. Valid values: |
| COLUMN_NAME | VARCHAR2(4000) | NO | The name of the column. |
| COLUMN_POSITION | NUMBER | NO | The position of the column in the partition key. |
| COLLATED_COLUMN_ID | NUMBER | NO | This column is not supported. It is always NULL. |
Sample query
Query the columns of subpartition keys in the partitioned table TBL2_F_RL owned by the current user.
obclient [SYS]> SELECT * FROM SYS.USER_SUBPART_KEY_COLUMNS WHERE NAME='TBL2_F_RL';
The query result is as follows:
+-----------+-------------+-------------+-----------------+--------------------+
| NAME | OBJECT_TYPE | COLUMN_NAME | COLUMN_POSITION | COLLATED_COLUMN_ID |
+-----------+-------------+-------------+-----------------+--------------------+
| TBL2_F_RL | TABLE | COL2 | 1 | NULL |
+-----------+-------------+-------------+-----------------+--------------------+
1 row in set
References
Query the columns of subpartition keys in all partitioned objects in the current tenant: DBA_SUBPART_KEY_COLUMNS
Query the columns of subpartition keys in all partitioned objects accessible to the current user: ALL_SUBPART_KEY_COLUMNS