Skip to content

Instantly share code, notes, and snippets.

@blackawa
Created May 12, 2016 06:49
Show Gist options
  • Save blackawa/edecd52fef8afcbdeb9166c052c9b3c8 to your computer and use it in GitHub Desktop.
Save blackawa/edecd52fef8afcbdeb9166c052c9b3c8 to your computer and use it in GitHub Desktop.
シーケンスのコピー
-- Thanks https://community.oracle.com/thread/630462?start=0&tstart=0
select 'Create Sequence '||sequence_name||
' increment by '||increment_by||
' start with '||last_number||
' maxvalue '||max_value||
decode(cycle_flag,'N',' NOCYCLE ',' CYCLE ')||
decode(cache_size,0,'NOCACHE ','CACHE '||cache_size)
from user_sequences;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment