how to fetch or extract oracle database operator

To fetch (extract) sql definition of an Oracle Database Operator or Indextype, this can be done through the DBMS_METADATA package. Moreover,  DBMS_METADATA provides a way for you to retrieve metadata from the database dictionary as XML or creation DDL and to submit the XML to re-create the object.

select dbms_metadata.get_ddl(‘OPERATOR’,’operatorname‘) from dual;

operatorname : substitute it with the actual name of the operator

This can be done also for indextype, you can extract the sql definition using the below query:

select dbms_metadata.get_ddl(‘INDEXTYPE’,’indextypename’) from dual;

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s