outer join in oracle sql -
i did searches oracle sql outer joins see whether there shotcut (like think in mysql can *= b believe, outer join). found 1 thing looked promising didn't work. trying find shortcut because can never remember outer join syntax. have time. take example:
select l.*, r.* database.login l left outer join database.relation r on l.user_id = r.user_id , r.user_id null
several values of r.user_id null expected. tried read somewhere:
select l.*, r.* database.login l, database.relation r l.user_id = +r.user_id
but did not select rows database.relation did not have user_id matching database.login.
so have type whole syntax? trying entry in login not in relation.
i suppose use following:
u.user_id not in select user_id database.relation
if necessary
you can this:
select l.*, r.* database.login l, database.relation r l.user_id = r.user_id (+)
for left outer join ,
select l.*, r.* database.login l, database.relation r l.user_id (+) = r.user_id
for right outer join
Comments
Post a Comment