{"id":18,"date":"2009-05-14T08:04:59","date_gmt":"2009-05-14T15:04:59","guid":{"rendered":"http:\/\/www.vinodsr.com\/myblog\/?p=18"},"modified":"2009-05-14T08:05:10","modified_gmt":"2009-05-14T15:05:10","slug":"how-to-export-sequences-using-sql","status":"publish","type":"post","link":"https:\/\/vinodsr.com\/myblog\/2009\/05\/how-to-export-sequences-using-sql\/","title":{"rendered":"How to export sequences  using sql"},"content":{"rendered":"<p>Normally sequences are not exported if we give partial export.<\/p>\n<p>For such cases we can use sql to generate quries for sequence droping and creating<\/p>\n<blockquote><p>select &#8216;drop sequence &#8216;||sequence_name||&#8217;;&#8217; from user_sequences where sequence_name like&#8217;SEQ_DB%&#8217;;<\/p>\n<p>select &#8216;create sequence &#8216;||sequence_name||<br \/>\n&#8216; minvalue &#8216;|| MIN_VALUE ||<br \/>\n&#8216; maxvalue &#8216;|| MAX_VALUE ||<br \/>\n&#8216; start with &#8216;||last_number||<br \/>\n&#8216; increment by &#8216;|| INCREMENT_BY ||<br \/>\n&#8216; cache &#8216;||CACHE_SIZE ||<br \/>\ndecode(ORDER_FLAG,&#8217;Y&#8217;,&#8217; order &#8216;)||<br \/>\ndecode(CYCLE_FLAG,&#8217;Y&#8217;,&#8217; cycle &#8216;)||<br \/>\n&#8216;;&#8217;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Normally sequences are not exported if we give partial export. For such cases we can use sql to generate quries for sequence droping and creating&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[45],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-oracle"],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":2,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":20,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/posts\/18\/revisions\/20"}],"wp:attachment":[{"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}