码迷,mamicode.com
首页 > 其他好文 > 详细

【2019年8月版】OCP 071认证考试原题-第41题

时间:2019-12-17 10:45:25      阅读:71      评论:0      收藏:0      [点我收藏+]

标签:order   删除   ota   let   ems   cas   The   认证   exec   

choose three

The ORDERS table has a primary key constraint on the ORDER_ID column.

The ORDER_ITEMS table has a foreign key constraint on the ORDER_ID column,referencing the primary key of the ORDERS table.

The constraint is defined with on DELETE CASCADE.

There are rows in the ORDERS table with an ORDER_TOTAL less than 1000.

Which three DELETE statements execute successfully?

A) DELETE FROM orders WHERE order_total<1000;

B) DELETE * FROM orders WHERE order_total<1000;

C) DELETE orders WHERE order_total<1000;

D) DELETE FROM orders;

E) DELETE order_id FROM orders WHERE order_total<1000;

Answer:ACD

(解析:这个考的是语法题,属于低智商题目,因为定义外键的时候用了 DELETE CASCADE 选项,所以父表的行是可以删除。)

【2019年8月版】OCP 071认证考试原题-第41题

标签:order   删除   ota   let   ems   cas   The   认证   exec   

原文地址:https://www.cnblogs.com/cnblogs5359/p/12052822.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!