在视图中可以改变列名, 如
create view v_emp as
select empno as eno, empname as ename, emp.deptno as e_deptno,
dept.deptno as d.deptno
from emp, dept
where emp.deptno=dept.deptno;
create view v_emp as
select empno as eno, empname as ename, emp.deptno as e_deptno,
dept.deptno as d.deptno
from emp, dept
where emp.deptno=dept.deptno;
SELECT t1.ID,t1.NAME,t2.ID,t2.NAME
FROM tablea t1, tableb t2
where t1.id = t2.id
------------------------------ ------- ----------
A TABLE
B TABLE SQL> create view v_tab as select tname table_name,tabtype tabletype from tab;View createdSQL> select * from v_tab;TABLE_NAME TABLETYPE
------------------------------ ---------
A TABLE
B TABLE
V_TAB VIEW