The GET_TABLE_INDEX_DDL function is used to extract index DDL statements for a table (TABLE) in batches.
Note
This function was introduced in V4.3.5 BP5 for V4.3.x.
Syntax
TYPE index_ddl_row IS RECORD (
index_name VARCHAR2(4000),
index_ddl CLOB
);
TYPE index_ddl_table IS TABLE OF index_ddl_row;
FUNCTION get_table_index_ddl (
table_name VARCHAR,
ob_schema VARCHAR DEFAULT NULL)
RETURN index_ddl_table PIPELINED;
Parameters
| Parameter | Description |
|---|---|
| table_name | The name of the table. |
| ob_schema | The schema that contains the table. The default value is the schema of the caller. |
Examples
Execute the following command to extract index DDL statements for a table in batches:
obclient> SELECT * FROM TABLE(DBMS_METADATA.GET_TABLE_INDEX_DDL(('TABLE_NAME', 'SCHEMA_NAME'));