前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >OCP-052考试题库汇总(1)-CUUG内部解答版

OCP-052考试题库汇总(1)-CUUG内部解答版

原创
作者头像
用户5892232
修改2019-07-24 17:28:42
2720
修改2019-07-24 17:28:42
举报

  USER1.EMP has a referential integrity constraint defined on EMP.DNO that references USER1.DEPT.DNO.

  USER1 executes these commands:

  SQL> UPDATE dept SET loc='UK' where dno=1;

  1 row updated.

  SQL> UPDATE emp SET sal=1000 where eno=100;

  1 row updated.

  SQL>ALTER TABLE dept DROP(dno)

  What will be the outcome and why?

  A)It will fail because a referential integrity constraint is defined on USER1.EMP.

  B)It will execute successfully and drop DEPT.DNO.

  C)It will fail because there is an uncommitted transaction on USER1.DEPT.

  D)It will execute successfully and drop the DEPT.DNO and EMP.DNO columns.

  E)It will fail because there is an uncommitted transaction on USER1.EMP

  Answer: A

  赵:

  A 译:它将失败,因为 USER1.EMP 上定义了引用完整性约束。

  小明:外键约束中,一个被作为外键引用的主键值不能直接删除,更不用说整个列

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
作者已关闭评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档