{"id":114,"date":"2013-06-29T12:12:03","date_gmt":"2013-06-29T17:12:03","guid":{"rendered":"https:\/\/bijoos.com\/oraclenotes\/?p=114"},"modified":"2026-02-07T15:35:12","modified_gmt":"2026-02-07T21:35:12","slug":"oracledb12c-new-feature-cascaded-truncate","status":"publish","type":"post","link":"https:\/\/bijoos.com\/oraclenotes\/2013\/114\/","title":{"rendered":"OracleDB12c New Feature: Cascaded Truncate"},"content":{"rendered":"<p>Oracle Database 12c, now TRUNCATE statement is enhanced with \u00a0CASCADE option. This is pretty useful, that you need not worry about truncating all &#8220;child&#8221; 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 key must be ENABLED and defined with &#8220;ON DELETE CASCADE&#8221; clause. There is no set limit to the recursive level of cascaded truncate. All child, grand child, great grandchild, etc tables will be truncated.<\/p>\n<p>Oracle12c also extended the same feature to truncating a partition. Now, ALTER TABLE &#8230; TRUNCATE PARTITION can include the CASCADE option as well.\u00a0Specify CASCADE to truncate the corresponding partition(s) or\u00a0subpartition(s) in all reference-partitioned child tables of table being truncated.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle Database 12c, now TRUNCATE statement is enhanced with \u00a0CASCADE option. This is pretty useful, that you need not worry about truncating all &#8220;child&#8221; 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 key must be ENABLED and &#8230; <a title=\"OracleDB12c New Feature: Cascaded Truncate\" class=\"read-more\" href=\"https:\/\/bijoos.com\/oraclenotes\/2013\/114\/\" aria-label=\"Read more about OracleDB12c New Feature: Cascaded Truncate\">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],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-oracledb","tag-oracle-12c"],"acf":[],"jetpack-related-posts":[{"id":139,"url":"https:\/\/bijoos.com\/oraclenotes\/2013\/139\/","url_meta":{"origin":114,"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":1586,"url":"https:\/\/bijoos.com\/oraclenotes\/2015\/1586\/","url_meta":{"origin":114,"position":1},"title":"OCA12c \u2013 1Z0-061 \u2013 Additional Reading 06","author":"Biju","date":"September 5, 2015","format":false,"excerpt":"[Additional] Reading material for 1z0-061 Oracle Database 12c SQL Fundamentals test. Chapter 6: Manipulating Data\u00a0explores how to manipulate data - adding, removing, and updating data. The chapter also covers how transaction control works. 9 Managing Tables Using DML Statements 9.1 Truncate data 9.2 Insert rows into a table 9.3 Update\u2026","rel":"","context":"In &quot;Certification &amp; Learning&quot;","block_context":{"text":"Certification &amp; Learning","link":"https:\/\/bijoos.com\/oraclenotes\/category\/certification-learning\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2087,"url":"https:\/\/bijoos.com\/oraclenotes\/2017\/2087\/","url_meta":{"origin":114,"position":2},"title":"Oracle Tidbits &#8211; August 2017 #oratidbit","author":"Biju","date":"September 3, 2017","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d (#oratidbit) published on Facebook, Twitter, and Google+\u00a0during weekdays\u00a0in August 2017. 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\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":"https:\/\/i0.wp.com\/bijoos.com\/oraclenotes\/wp-content\/uploads\/2017\/02\/oratidbit.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":426,"url":"https:\/\/bijoos.com\/oraclenotes\/2014\/426\/","url_meta":{"origin":114,"position":3},"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":1513,"url":"https:\/\/bijoos.com\/oraclenotes\/2015\/1513\/","url_meta":{"origin":114,"position":4},"title":"Oracle Tidbits &#8211; March 2015","author":"Biju","date":"April 1, 2015","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d (#oratidbit) published at\u00a0https:\/\/www.facebook.com\/oraclenotes\u00a0on weekdays\u00a0in March\u00a02015. 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 use\u2026\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":21,"url":"https:\/\/bijoos.com\/oraclenotes\/2011\/21\/","url_meta":{"origin":114,"position":5},"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":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/114","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=114"}],"version-history":[{"count":1,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":3039,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/114\/revisions\/3039"}],"wp:attachment":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}