set line 200
set pagesize 0
set long 99999
set feedback off
set echo off
获得表、索引、视图、存储过程、函数的DDL:
select dbms_metadata.get_ddl(‘TABLE‘,‘TABLE_NAME‘,‘TABLE_OWNER‘) from dual;
select dbms_metadata.get_ddl(‘INDEX‘,‘INDEX_NAME‘,‘INDEX_OWNER‘) from dual;
select dbms_metadata.get_ddl(‘VIEW‘,‘VIEW_NAME‘,‘VIEW_OWNER‘) from dual;
select dbms_metadata.get_ddl(‘PROCEDURE‘,‘PROCEDURE_NAME‘,‘PROCEDURE_OWNER‘) from dual;
select dbms_metadata.get_ddl(‘FUNCTION‘,‘FUNCTION_NAME‘,‘FUNCTION_OWNER‘) from dual;
时间: 2024-11-05 14:38:33