日期:2014-05-16  浏览次数:20389 次

oracle11g 普通视图详解

create view TEST_USER as select u.yhdm,u.xm,u.bmdm,u.sfzmhm from acl_user u with read only


select * from test_user

--update test_user set xm='aaa' where yhdm='120970' 更新的话报 ORA-42399: 无法对只读视图执行 DML 操作


--普通视图可以有效利用基表的已有所有索引优点 ,因为oracle 11g 中当我们查询普通视图的适合,它替换用户的select语句中的底层查询定义,
--并处理结果查询,就好像视图不存在一样