代码改变世界

12c OCP考试专项 [1z0-071]-Q2:DELETE/TRUNCATE(2020.06.12)

2020-06-12 17:23  askscuti  阅读(332)  评论(0编辑  收藏  举报

which statement is true TRUNCATE and DELETE?

A. For large tables,DELETE is faster then TRUNCATE.
B. For tables with multiple indexes and triggers,DELETE is faster then TRUNCATE.
C. You can DELETE rows from a table with referential integrity comstrants.
D. You can never TRUNCATE a table if foreign key constraints would be violated.

Answer: C

Explanation:
A:对于大型表,DELETE比TRUNCATE更快。错误,慢。
B:对于具有多个索引和触发器的表,DELETE比TRUNCATE更快。错误,慢。
D:如果违反了外键约束,则永远不能截断表。错误,如果完整性约束是自引用的,则可以截断表。

提示:答案为个人理解和解答,难免有错,也欢迎大家及时指正。