oracle导出序列的几种办法

1. 拼接生成序列的语句

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 dba_sequences where sequence_owner= 'DUBBO';  --用户名称要大写

2. 查询序列生成语句

select dbms_metadata.get_ddl('SEQUENCE',u.object_name) from user_objects u where object_type='SEQUENCE';

 

转自:oracle导出序列的几种办法

posted @ 2018-10-16 18:45  雪山上的蒲公英  阅读(3715)  评论(0编辑  收藏  举报
/* 返回顶部代码 */