{"id":135,"date":"2013-07-05T12:12:49","date_gmt":"2013-07-05T17:12:49","guid":{"rendered":"https:\/\/bijoos.com\/oraclenotes\/?p=135"},"modified":"2026-02-07T15:35:10","modified_gmt":"2026-02-07T21:35:10","slug":"oracledb12c-new-feature-merging-and-splitting-multiple-partitions","status":"publish","type":"post","link":"https:\/\/bijoos.com\/oraclenotes\/2013\/135\/","title":{"rendered":"OracleDB12c New Feature: Merging and Splitting Multiple Partitions"},"content":{"rendered":"<p>In Oracle11g, you can merge or split two partitions. This feature is enhanced in 12c to merge and split multiple partitions in a single SQL thus reducing the maintenance operations. When merging range partitions, they must be adjacent.<\/p>\n<p>Merging Partitions Example:<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">ALTER TABLE SALESDATA\nMERGE PARTITIONS S2012Q1, S2012Q2, S2012Q3, S2012Q4 INTO S2012;<\/pre>\n<p>If range partitions are merged, you may use the &#8220;TO&#8221; clause.<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">ALTER TABLE SALESDATA\nMERGE PARTITIONS S2012Q1 TO S2012Q4 INTO S2012;<\/pre>\n<p>Read more about this feature and restrictions in <a title=\"Merging Multiple Partitions\" href=\"http:\/\/docs.oracle.com\/cd\/E16655_01\/server.121\/e17613\/part_admin002.htm#autoId53\" target=\"_blank\">Oracle Documentation<\/a>.<\/p>\n<p>Splitting Partitions Example:<\/p>\n<pre class=\"lang:default highlight:0 decode:true crayon-selected\">ALTER TABLE SALESDATA SPLIT PARTITION S2014 INTO\n(PARTITION S2014Q1 VALUES LESS THAN TO_DATE('01-APR-14','DD-MON-YY')),\n(PARTITION S2014Q2 VALUES LESS THAN TO_DATE('01-JUL-14','DD-MON-YY')),\n(PARTITION S2014Q3 VALUES LESS THAN TO_DATE('01-OCT-14','DD-MON-YY')),\n(PARTITION S2014Q4 );<\/pre>\n<p>Read more in <a title=\"Splitting into multiple partitions\" href=\"http:\/\/docs.oracle.com\/cd\/E16655_01\/server.121\/e17613\/part_admin002.htm#autoId96\" target=\"_blank\">Oracle Documentation<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Oracle11g, you can merge or split two partitions. This feature is enhanced in 12c to merge and split multiple partitions in a single SQL thus reducing the maintenance operations. When merging range partitions, they must be adjacent. Merging Partitions Example: ALTER TABLE SALESDATA MERGE PARTITIONS S2012Q1, S2012Q2, S2012Q3, S2012Q4 INTO S2012; If range partitions &#8230; <a title=\"OracleDB12c New Feature: Merging and Splitting Multiple Partitions\" class=\"read-more\" href=\"https:\/\/bijoos.com\/oraclenotes\/2013\/135\/\" aria-label=\"Read more about OracleDB12c New Feature: Merging and Splitting Multiple Partitions\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[133],"tags":[40,60],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-oracledb","tag-oracle-12c","tag-partition"],"acf":[],"jetpack-related-posts":[{"id":139,"url":"https:\/\/bijoos.com\/oraclenotes\/2013\/139\/","url_meta":{"origin":135,"position":0},"title":"OracleDB12c New Feature: Adding, Dropping, Truncating Multiple Partitions","author":"Biju","date":"July 6, 2013","format":false,"excerpt":"Yesterday, we discussed merging and splitting multiple partitions. The same feature is extended in 12c to add, drop or truncate multiple partitions in a single SQL statement. Add multiple partitions example: ALTER TABLE SALESDATA ADD PARTITION S2015Q1 VALUES LESS THAN (TO_DATE('01-APR-15','DD-MON-YY')), PARTITION S2015Q2 VALUES LESS THAN (TO_DATE('01-JUL-15','DD-MON-YY')), PARTITION S2015Q3 VALUES\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":426,"url":"https:\/\/bijoos.com\/oraclenotes\/2014\/426\/","url_meta":{"origin":135,"position":1},"title":"Oracle Tidbits &#8211; June 2014","author":"Biju","date":"June 30, 2014","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d published at\u00a0https:\/\/www.facebook.com\/oraclenotes\u00a0on all weekdays\u00a0in June\u00a02014. You will also see these tidbits, one tidbit at a time, for each page refresh on the right side of this blog as well\u2026 TidBit Topic In Oracle Database 12c, the Pre-Upgrade Information Tool script is preupgrd.sql (meaningfully named). Earlier release pre-upgrade\u2026","rel":"","context":"In &quot;TidBits &amp; Quick Tips&quot;","block_context":{"text":"TidBits &amp; Quick Tips","link":"https:\/\/bijoos.com\/oraclenotes\/category\/tidbits\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":495,"url":"https:\/\/bijoos.com\/oraclenotes\/2014\/495\/","url_meta":{"origin":135,"position":2},"title":"Oracle TidBits &#8211; July 2014","author":"Biju","date":"August 1, 2014","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d published at\u00a0https:\/\/www.facebook.com\/oraclenotes\u00a0on all weekdays\u00a0in July 2014. You will also see these tidbits, one tidbit at a time, for each page refresh on the right side of this blog as well\u2026 Hope you find these helpful to learn something new or to remind you of its existence and\u2026","rel":"","context":"In &quot;TidBits &amp; Quick Tips&quot;","block_context":{"text":"TidBits &amp; Quick Tips","link":"https:\/\/bijoos.com\/oraclenotes\/category\/tidbits\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":114,"url":"https:\/\/bijoos.com\/oraclenotes\/2013\/114\/","url_meta":{"origin":135,"position":3},"title":"OracleDB12c New Feature: Cascaded Truncate","author":"Biju","date":"June 29, 2013","format":false,"excerpt":"Oracle Database 12c, now TRUNCATE statement is enhanced with \u00a0CASCADE option. This is pretty useful, that you need not worry about truncating all \"child\" tables before truncating the parent. With the CASCADE option, Oracle will truncate all tables with a foreign key constraint to the table being truncated. The foreign\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":21,"url":"https:\/\/bijoos.com\/oraclenotes\/2011\/21\/","url_meta":{"origin":135,"position":4},"title":"Read Only Tables [Orig Published Apr 2000]","author":"Biju","date":"September 26, 2011","format":false,"excerpt":"In Oracle (all versions including 10g) you can make a tablespace read only, but not a single table. To make a table read only, you need to have that table in its own tablespace. If the tablespace has many tables, then you can either make all the tables read only\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1777,"url":"https:\/\/bijoos.com\/oraclenotes\/2016\/1777\/","url_meta":{"origin":135,"position":5},"title":"Oracle Tidbits &#8211; October 2016 #oratidbit","author":"Biju","date":"November 3, 2016","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d (#oratidbit) published at\u00a0https:\/\/www.facebook.com\/oraclenotes\u00a0on weekdays\u00a0in October 2016. You will also see these tidbits, one tidbit at a time, for each page refresh on the right side of this blog as well\u2026 Hope you find these helpful to learn something new or to remind you of its existence and\u2026","rel":"","context":"In &quot;TidBits &amp; Quick Tips&quot;","block_context":{"text":"TidBits &amp; Quick Tips","link":"https:\/\/bijoos.com\/oraclenotes\/category\/tidbits\/"},"img":{"alt_text":"Oracle TidBit","src":"https:\/\/i0.wp.com\/bijoos.com\/oraclenotes\/wp-content\/uploads\/2014\/05\/TidBit.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":1,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":3033,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/135\/revisions\/3033"}],"wp:attachment":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}