[prog] SQL Joins

tiera tiera at comhem.se
Fri Apr 16 08:40:45 EST 2004


On Wed, Apr 14, 2004 at 09:08:27AM -0700, Cynthia Kiser wrote:
> Not sure if mysql has subqueries now. If not, amend the "off contract"
> query in my previous post to:
> 	select **stuff you want**
> 	from **tables using your outer joins**
> 	where contract price is null
> 
> And if mysql supports UNION ALL, that might give you better
> performance merging the two sets - since you know they are mutually
> exclusive. 
> 

Hi again.

The where-part of the above query would make me lose every product row
that isn't connected to a contract. Plus a product that is connected
to a contract doesn't have to have a contract price, so I would lose
those products too. As I said in my previous post I've rewritten it
with more than one query so I've got a solution for the moment. 

Thanks again!

/Tiera


More information about the Programming mailing list