Wednesday, September 12, 2012

Two source tables to one target table interface example

Create one table for combination of both emp and dept tables.



CREATE TABLE EMP_DEPT AS
  (SELECT E.EMPNO,
      E.ENAME,
      E.JOB,
      E.MGR,
      E.SAL,
      E.HIREDATE,
      E.COMM,
      E.DEPTNO,
      D.DNAME,
      D.LOC
    FROM SCOTT.EMP E,
      SCOTT.DEPT D
    WHERE E.DEPTNO=D.DEPTNO
    AND 1=2
  );














No comments:

Post a Comment