[thelist] SQL left join - it works, but why?

Liz Lawson lizlawson at charitycards.co.uk
Tue Jul 18 12:07:36 CDT 2000


Thanks Adam

>so maybe what's probably possibly could be happening is that the outer
>join is working but with (b.catID is null) you're throwing away those
>rows that match (b.catid != a.catid).


Yes, that's what's happening but it's OK, that IS what I want...only the
rows with a null for b.catID. They are the products which only appear in one
category.

I was always getting the right results, I just couldn't work out why...but
you confirming the "only get a null row if there aren't any not null ones"
thing has cleared that up for me

( I hate it if something works and I don't know why...I keep thinking it
might just stop working! )


Many thanks

Liz






More information about the thelist mailing list