| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: bulduing a select to get excluded datas
What you need, if your server supports is, is an OUTER JOIN. There are
various server specific and older syntaxes, but the SQL-92 syntax is:
select users.map_id,users_list.rank
from users_list
left outer join users
on users.map_id = users_list.map_id
where
users.map_id IS NULL;
The outer join will join any rows of the left table which have no match in the right or outer table to a NULL row. The join condition must be included in an ON clause as the where filtering is performed post-join. The test for the NULL valued column from the outer table must be included in a where clause to filter out those rows that found a match.
Art S. Kagel
-- Message posted via http://www.dbmonster.comReceived on Wed Apr 06 2005 - 09:12:06 CDT
![]() |
![]() |