Chinaunix首页 | 论坛 | 博客
  • 博客访问: 600306
  • 博文数量: 487
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4916
  • 用 户 组: 普通用户
  • 注册时间: 2018-07-05 13:59
个人简介

ocp考试资料群:569933648 验证码:ocp OCP 12c 19c考试题库解析与资料群:钉钉群号:35277291

文章分类

全部博文(487)

文章存档

2023年(37)

2021年(151)

2020年(37)

2019年(222)

2018年(38)

我的朋友

分类: Oracle

2019-07-24 13:27:38

  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 上定义了引用完整性约束。

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

阅读(673) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~