oracle导出sequence和view

--导出sequence
select 'create sequence '||sequence_name|| 
       ' minvalue '||min_value|| 
       ' maxvalue '||max_value|| 
       ' start with '||last_number|| 
       ' increment by '||increment_by|| 
       (case when cache_size=0 then ' nocache' else ' cache '||cache_size end) ||';'
from user_sequences;

select   text   from   all_views   where   owner in ('RTJJ');
--导出view
select   dbms_metadata.get_ddl('VIEW',v.view_name) from ALL_views v WHERE owner in ('RTJJ');

你可能感兴趣的:(sequence)