DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: quick question about the where clause

  1. #1
    Join Date
    Sep 2000
    Posts
    23

    Exclamation

    Heres a quickie lads,

    i have part of a sql statement (below)

    where A.object_id(+)=b.id1

    what does the (+) mean?????

    cant find it anywhere in the books.

    Chars
    Doug

  2. #2
    Join Date
    Jul 2000
    Posts
    119
    hi there . i think you are asking about the outer joins , it is actually meant to provide the data from the tables , including no similar values from a common coloumn .. you can have more info in any good pl/sql book .
    say in the example you had given . the data from the A and B tables will be displayed having common id vales as well as non common values from each table .

  3. #3
    Join Date
    Sep 2000
    Posts
    128
    In this example:

    where A.object_id(+)=b.id1

    It will include all records which fulfill the join criteria AND all records from table b but no matching record in table a.

    i.e. It marks which column can have null data corresponding to non-null calues in the other table

    or
    where A.object_id=b.id1 (+)

    Will do the otherway round - all records matching the join, + records from table a which aren't in table b.

    e.g.
    select a.dept, b.employee
    where a.deptid = b.deptid (+)

    could give (departments without employees):

    DEPT----EMPLOYEE
    1a-------SMITH
    2b-------JONES
    3a-------

    or say to find out which employees don't have a department:
    select a.dept, b.employee
    where a.deptid (+) = b.deptid

    DEPT----EMPLOYEE
    1a-------SMITH
    2b-------JONES
    ----------MURPHY


    Hope that helps,

    Terry

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