oracle 导出序列脚本

oracle 导出序列脚本
方法一:
select
'create sequence  USERNAME.'|| SEQUENCE_NAME || ' minvalue '||MIN_VALUE||' maxvalue '||MAX_VALUE||' start with '||LAST_NUMBER||' increment by '||INCREMENT_BY||' cache '||CACHE_SIZE||' ;'
from dba_sequences where SEQUENCE_OWNER='USERNAME' AND SEQUENCE_NAME LIKE 'MM_%';


方法二:
select dbms_metadata.get_ddl('SEQUENCE',u.object_name) from user_objects u where object_type='SEQUENCE'

你可能感兴趣的:(oracle 导出序列脚本)