{"id":846,"date":"2007-07-20T06:10:39","date_gmt":"2007-07-20T09:10:39","guid":{"rendered":"http:\/\/blog.decade.com.br\/?p=846"},"modified":"2011-06-10T15:12:26","modified_gmt":"2011-06-10T18:12:26","slug":"question-10","status":"publish","type":"post","link":"https:\/\/blog.decade.com.br\/?p=846","title":{"rendered":"QUESTION: 10"},"content":{"rendered":"<p align=justify>\nIn SQL Plus You issued this command:<\/p>\n<p align=justify>\n<code><\/p>\n<blockquote><p>\nDELETE FROM dept WHERE dept_id = 901;\n<\/p><\/blockquote>\n<p><\/code><\/p>\n<p align=justify>\nYou received an integrated constraint error because the child record was found. What could you do to make the statement execute?<\/p>\n<p align=justify>\n<strong>A:<\/strong> Delete the child record first.<br \/>\n<strong>B:<\/strong> You cannot make the command execute.<br \/>\n<strong>C:<\/strong> Add a fourth keyword to the command.<br \/>\n<strong>D:<\/strong> Add the constraints cascade option to the command.<\/p>\n<p align=justify>\nANSWER: <strong>A<\/strong><\/p>\n<p align=justify>\nEXPLANATION: <strong>Answer A is correct because you need first delete the child record in dependable table for avoid foreign constraint violation.<\/strong><\/p>\n<p align=justify>\nINCORRECT ANSWERS:<\/p>\n<p align=justify>\n<strong>B:<\/strong> You can execute the command if you don\u2019t have child records in other tables for record you need to delete in the parent table DEPT.<br \/>\n<strong>C:<\/strong> Adding an additional keyword will not help because foreign constraint will be violated.<br \/>\n<strong>D:<\/strong> CASCADE CONSTRAINTS option works only for DROP TABLE command, not for DELETE.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In SQL Plus You issued this command: DELETE FROM dept WHERE dept_id = 901; You received an integrated constraint error because the child record was found. What could you do to make the statement execute? A: Delete the child record first. B: You cannot make the command execute. C: Add a fourth keyword to the [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,13,8],"tags":[],"class_list":["post-846","post","type-post","status-publish","format-standard","hentry","category-1z0-001","category-oca-plsql-developer","category-oracle"],"_links":{"self":[{"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=\/wp\/v2\/posts\/846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=846"}],"version-history":[{"count":0,"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=\/wp\/v2\/posts\/846\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.decade.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}