OCP 1Z0 051 170
2014-06-01 22:20
176 查看
170. Which two statements are true regarding the DELETE and TRUNCATE commands? (Choose two.)
A. DELETE can be used to remove only rows from only one table at a time.
B. DELETE can be used to remove only rows from multiple tables at a time.
C. DELETE can be used only on a table that is a parent of a referential integrity constraint.
D. DELETE can be used to remove data from specific columns as well as complete rows.
E. DELETE and TRUNCATE can be used on a table that is a parent of a referential integrity constraint
having ON DELETE rule .
A delete一次只能删一个表的数据,当然truncate也只能删一个表
A对B错
C delete只能删除有参照约束中的主表。这显然不对,要先删除子表才能删除主表。
D delete可以只删几列的数据,这当然不可能。
E 不对,delete 可以,truncate不行
Answer: AE
A. DELETE can be used to remove only rows from only one table at a time.
B. DELETE can be used to remove only rows from multiple tables at a time.
C. DELETE can be used only on a table that is a parent of a referential integrity constraint.
D. DELETE can be used to remove data from specific columns as well as complete rows.
E. DELETE and TRUNCATE can be used on a table that is a parent of a referential integrity constraint
having ON DELETE rule .
A delete一次只能删一个表的数据,当然truncate也只能删一个表
A对B错
C delete只能删除有参照约束中的主表。这显然不对,要先删除子表才能删除主表。
SQL> alter table emp2 add constraints fk_deptno foreign key (deptno) references dept2(deptno); Table altered SQL> delete from dept2; delete from dept2 ORA-02292: integrity constraint (TEST.FK_DEPTNO) violated - child record found SQL> delete emp2; 14 rows deleted SQL> delete from dept2; 4 rows deleted
D delete可以只删几列的数据,这当然不可能。
E 不对,delete 可以,truncate不行
SQL> create table dept2 as select * from dept; Table created SQL> create table emp2 as select * from emp; Table created SQL> alter table dept2 add constraints pk_dept primary key(deptno); Table altered SQL> alter table emp2 add constraints fk_deptno foreign key (deptno) references dept2(deptno) on delete cascade; Table altered SQL> truncate table dept2; truncate table dept2 ORA-02266: unique/primary keys in table referenced by enabled foreign keys SQL> delete dept2; 4 rows deleted又是一个有误的题
Answer: AE
相关文章推荐
- OCP-1Z0-051-V9.02-170题
- OCP-1Z0-051-V9.02-48题
- OCP-1Z0-051-V9.02-56题
- OCP-1Z0-051-V9.02-88题
- OCP-1Z0-051-V9.02-125题
- OCP-1Z0-051-V9.02-138题
- OCP-1Z0-051-V9.02-166题
- OCP-1Z0-051-V9.02-80题
- OCP-1Z0-051-V9.02-34题
- OCP-1Z0-新051-61题版本-7
- OCP-1Z0-新051-61题版本-22
- OCP-1Z0-新051-61题版本-38
- OCP-1Z0-新051-61题版本-54
- OCP-1Z0-051 第13题 q操作符
- OCP-1Z0-051 第14题 DISTINCT去重
- OCP-1Z0-051 第31题 约束规则
- OCP-1Z0-051 第44题 SEQUENCE的缺省值
- OCP-1Z0-051 第57题 别名和null值判断
- OCP-1Z0-051 第77题 INITCAP和SUBSTR函数
- OCP-1Z0-051 第90题 转换函数