Question Regarding Inner and Outer Join
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Question Regarding Inner and Outer Join

  1. #1
    Join Date
    Aug 2001
    Posts
    9

    Exclamation

    Hi ,
    Thanks for your reply and I understand the exact meaning of SOUNDEX function.
    Like that pls explain me the difference between
    INNER and OUTER Joins with exampls. ( I was totelly new to oracle).
    Thank you.
    Rajesh

  2. #2
    Join Date
    Dec 2000
    Location
    Virginia, USA
    Posts
    455
    I think best way to learn about Inner and Outer Join is by looking at the result set. Do Following.

    1- Connect as SCOTT/TIGER

    2- Equi Join
    Select e.ename, e.sal, e.empno, d.dname, d.deptno
    from emp e, dept d
    where e.deptno = d.deptno

    3- Inner Join
    Select e.ename, e.sal, e.empno, d.dname, d.deptno
    from emp e, dept d
    where e.deptno(+) = d.deptno
    (This will also give you the deptno that does not have any employee such as Deptno 40)


    4- Update emp
    set deptno = NULL
    where job = 'PRESIDENT'
    (This will take out the president from the deptno 10)


    5- Outer Join
    Select e.ename, e.sal, e.empno, d.dname, d.deptno
    from emp e, dept d
    where e.deptno = d.deptno(+)
    (This will give you the employee who is not associated with any deptno such as President)

    Also look at the following website
    http://databases.about.com/library/weekly/aa022501b.htm

    [Edited by irehman on 08-30-2001 at 11:02 AM]

  3. #3
    Join Date
    Aug 2001
    Posts
    9
    Thank Q verymuch Ibrahim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width