How to extract the table/index definition

Q: How to extract the table definition (DDL statements) from an Oracle database without having to go through a stack of dictionary views?
A: select DBMS_METADATA.GET_DDL('TABLE','<table_name>') from DUAL;

Q: How to extract the index definition (DDL statements) from an Oracle database without having to go through a stack of dictionary views?

A: select DBMS_METADATA.GET_DDL('INDEX','<index_name>') from DUAL;

猜你喜欢

转载自cowboyhust.iteye.com/blog/1992080
今日推荐