【OCP-12c】CUUG 071题库考试原题及答案解析(18)

视图更新与限制
本文探讨了关于数据库视图的两个关键事实:一是如何利用OR REPLACE选项修改现有视图定义,而无需删除和重新创建;二是如何应用WITH CHECK OPTION约束来限制通过视图对基础表进行更改的条件,确保只有符合子查询条件的行才能被更新。

18、(8-7) choose two
Which two statements are true regarding views? (Choose two.)

A) A simple view in which column aliases have been used cannot be updated.
B) The OR REPLACE option is used to change the definition of an existing view without dropping
and re-creating it.
C) The WITH CHECK OPTION constraint can be used in a view definition to restrict the columns
displayed through the view.
D) Rows added through a view are deleted from the table automatically when the view is dropped.
E) Rows cannot be deleted through a view if the view definition contains the DISTINCT keyword.
F) A subquery used in a complex view definition cannot contain group functions or joins.

Answer:BE
(解析:
只要是简单视图,使用别名的列是可以使用 UPDATE 命令更新的。
WITH CHECK OPTION 用于限制通过视图更改基表的条件,禁止更改不包含在子查询条件里的行。)

转载于:https://www.cnblogs.com/cnblogs5359/p/10399408.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值