Note
This view is available starting with V2.2.30.
Purpose
This view displays the index column information of all tables in the database.
Applicability
This view applies only to OceanBase Database in Oracle mode.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| INDEX_OWNER | VARCHAR2(128) | NO | The owner of the index. |
| INDEX_NAME | VARCHAR2(128) | NO | The name of the index. |
| TABLE_OWNER | VARCHAR2(128) | NO | The owner of the table on which the index is created. |
| TABLE_NAME | VARCHAR2(128) | NO | The name of the table on which the index is created. |
| COLUMN_NAME | VARCHAR2(4000) | NO | The name of the indexed column. |
| COLUMN_POSITION | NUMBER | NO | The position of the indexed column in the index. |
| COLUMN_LENGTH | NUMBER | NO | The length of the indexed column. |
| CHAR_LENGTH | NUMBER | NO | The character length of the indexed column. |
| DESCEND | VARCHAR2(4) | NO | Specifies whether the indexed column is sorted in ascending order (ASC) or descending order (DESC). |
| COLLATED_COLUMN_ID | NUMBER | NO | This column is not supported. The default value is NULL. |
Sample query
Query the index column information of the indexed table TBL2 in the current tenant.
obclient [SYS]> SELECT * FROM DBA_IND_COLUMNS WHERE TABLE_NAME='TBL2';
The query result is as follows:
+-------------+--------------------------------+-------------+------------+-------------+-----------------+---------------+-------------+---------+--------------------+
| INDEX_OWNER | INDEX_NAME | TABLE_OWNER | TABLE_NAME | COLUMN_NAME | COLUMN_POSITION | COLUMN_LENGTH | CHAR_LENGTH | DESCEND | COLLATED_COLUMN_ID |
+-------------+--------------------------------+-------------+------------+-------------+-----------------+---------------+-------------+---------+--------------------+
| SYS | TBL2_OBUNIQUE_1737535889306073 | SYS | TBL2 | COL1 | 1 | 22 | 0 | ASC | NULL |
| SYS | TBL2_IDX1 | SYS | TBL2 | COL2 | 1 | 22 | 0 | ASC | NULL |
+-------------+--------------------------------+-------------+------------+-------------+-----------------+---------------+-------------+---------+--------------------+
2 rows in set