时间:2021-07-01 10:21:17 帮助过:14人阅读
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;
ORACLE不使用工具的情况下获取对象DDL
标签:存储过程 ges size name 视图 table select 获取 情况下