--表的另一种形式,看起来很像表 --用view可以实现复杂的query====select --创建一个视图 --当经常使用这个查询时封装成view /*create or replace 表示在创建视图时,如果已存在同名的视图,则重新创建, 如果只用create 创建,则需将原有的视图删除后才能创建*/ drop view v1; create view v1 as select * from stud where name like '%a%'; --直接查询view select * f…
ORACLE 视图的 with check option 我们来看下面的例子: create or replace view testview as select empno,ename from emp where ename like ‘M%’ with check option; 这里我们创建了一个视图,并使用了with check option来限制了视图. 然后我们来看一下视图包含的结果: select * from testview得到: EMPNO ENAME ———- ———–…