OCP 1Z0 051 28
来源:互联网 发布:梦想网络活跃ip查询器 编辑:程序博客网 时间:2024/05/24 15:42
SQL> alter table emp modify ename null;Table altered
28. Which two statements are true regarding constraints? (Choose two.)
A. A foreign key cannot contain NULL values.
B. A column with the UNIQUE constraint can contain NULL values.
C. A constraint is enforced only for the INSERT operation on a table.
D. A constraint can be disabled even if the constraint column contains data.
E. All constraints can be defined at the column level as well as the table level.
A.不对
SQL> SELECT c.table_name, c.constraint_name, c.r_constraint_name 2 FROM user_constraints c 3 WHERE constraint_type = 'R';TABLE_NAME CONSTRAINT_NAME R_CONSTRAINT_NAME------------------------------ ------------------------------ ------------------------------EMP FK_DEPTNO PK_DEPT1 row selectedSQL> insert into emp(empno,deptno) values(9999,null);1 row inserted
B 对
SQL> create unique index idx_emp_ename on emp(ename);Index createdSQL> insert into emp (empno,ename) values(9998,null);1 row inserted
C不对
SQL> alter table emp modify ename not null;Table alteredSQL> update emp set ename = null where empno = 7788;update emp set ename = null where empno = 7788ORA-01407: 无法更新 ("SCOTT"."EMP"."ENAME") 为 NULL
D 对
SQL> alter table emp modify ename null;Table altered
E不对
SQL> alter table emp add constraints ch_sal check(sal >= (case when comm > 0 then 1 else 0 end));Table altered
Answer: BD
0 0
- OCP 1Z0 051 28
- OCP 1Z0 051 QUESTION NO: 28
- OCP-1Z0-051-2015-28题
- OCP 1Z0 051 1
- OCP 1Z0 051 2
- OCP 1Z0 051 3
- OCP 1Z0 051 4
- OCP 1Z0 051 5
- OCP 1Z0 051 6
- OCP 1Z0 051 7
- OCP 1Z0 051 8
- OCP 1Z0 051 9
- OCP 1Z0 051 10
- OCP 1Z0 051 11
- OCP 1Z0 051 12
- OCP 1Z0 051 13
- OCP 1Z0 051 14
- OCP 1Z0 051 15
- TCP/UDP协议
- extjs 自定义事件
- 关于#!/usr/bin/php的意义
- 论C++与三国
- 安装SQL Server2012报Microsoft.NET Framework4无法安装错误解决方案
- OCP 1Z0 051 28
- js/jQuery插件收集
- QT与windows系统修改杂记
- 简单工厂、工厂方法和抽象工厂的区别
- Cocos2d-x--实现Loading界面加载资源
- js写99乘法口诀表
- java操作word模板不借助第三方软件包
- When is a destructor called?
- [openflow] openflow source code download