日期:2014-05-16 浏览次数:20451 次
create or replace view emp_dept_ve
(empno,ename,job,hiredate,sal,dname,loc) AS
select e.empno,e.ename,e.job,e.hiredate,e.sal, d.dname,d.loc
from emp e
left join dept d on d.deptno = e.deptno
;
-- emp_dept_ve 是给视图取的视图名
第二种方法
create or replace view emp_dept_ve as
select e.empno,e.ename,e.job,e.hiredate,e.sal, d.dname,d.loc
from emp e
left join dept d on d.deptno = e.deptno;