2.Which two statements are true about views?
A.A view must only refer to tables in its defining query.
B.The WITH CHECK clause prevents certain rows from being displayed when querying the view
C.Views can be updated without the need to re-grant privileges on the view
D.The WITH CHECK clause prevents certain rows from being updated or inserted in the underlying table through the view.
E.Views can be indexed
SQL> create view view1 as select * from t1;
View created.
SQL> create view view2 as select * from view1;
View created.
SQL> create or replace view test1_view as select * from test1 where id < 5 with check option;
View created.
SQL> delete from test1;
2 rows deleted.
SQL> insert into test1_view values (1);
1 row created.
SQL> insert into test1_view values (20);
insert into test1_view values (20)
*
ERROR at line 1:
ORA-01402: view WITH CHECK OPTION where-clause violation
SQL> select * from test1;
ID
----------
1
SQL> select * from test1_view;
ID
----------
1
答案:CD
A.VIEW也可以创建VIEW,所以A错误
B.WITH CHECK OPTION作用在 VIEW INSERT 或者UPDATE VIEW当中
C.不需要对VIEW重新授权,正确
D.正确
E.VIEW不能加Index
版权声明:本文为博主原创文章,未经博主允许不得转载。
oracle
- 上一篇:oracle 1z-082 第一题
- 下一篇:oracle 1z-082 第3题