方法一:
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= 'JXDB' ;-- JXDB(賬戶名)貌似要大寫才行
執(zhí)行此操作后會(huì)生成創(chuàng)建序列的語(yǔ)句
方法二:
select dbms_metadata.get_ddl('SEQUENCE',u.object_name) from user_objects u where object_type='SEQUENCE'
方法三:
用plsql,直接用鼠標(biāo)操作,右邊對(duì)象窗口,找到Sequences,在要導(dǎo)出的序列名稱上右鍵--查看,然后點(diǎn)擊右下角的查看sql,即可查看該序列的創(chuàng)建sql,然后復(fù)制即可
————————————————
版權(quán)聲明:本文為CSDN博主「779650512」的原創(chuàng)文章,遵循CC 4.0 BY-SA版權(quán)協(xié)議,轉(zhuǎn)載請(qǐng)附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/qq_32160853/article/details/81303253
本文摘自 :https://www.cnblogs.com/