• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Table Relationship

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the difference between '=' and '*=' when we establish relationship between tables
because when i execute

Select e.name as Name, e.address as Address,d.deptname as Department
from emp e ,dept d
where e.deptid *= d.deptid
and ( e.name like 'a%' )

then along with the records where name starts with 'a' , i also get the records with name blank
But ,when i execute the following sql command ,i only get the records where name starts with 'a'

Select e.name as Name, e.address as Address,d.deptname as Department
from emp e ,dept d
where e.deptid = d.deptid
and ( e..name like 'a%' )
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is it * or (+)

if (+) its an left outer join.which means the left side column values is needed while its not necessary that i should have corresponding values in the dept table
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Devaki,
When I try to run your query -- via SQL*Plus -- on my Oracle 9i database running on SUN [sparc] Solaris 9, I get the following:

So how come it works for you?

Good Luck,
Avi.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic