List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:August 27 1999 5:07am
Subject:Re: LEFT JOIN ON Clause moved to WHERE
View as plain text  
Michael Griffith wrote:
> 
> I read in one of the messages on the list posted by Monty that when
> processing  a LEFT JOIN, mysql moves the ON clause to the WHERE clause.
> 
> I like to use the LEFT JOIN ... ON syntax for easier reading when I write
> complicated queries, but many times I cannot get a query to work unless I
> move the ON clause to the WHERE clause myself. Sorry I don't have a specific
> example.
> 
> In other words, can anyone give a definitive answer on what is the
> difference between these two queries:
> 
> 1) SELECT * FROM a,b WHERE a.id = b.id
> 2) SELECT * FROM a LEFT JOIN b ON a.id = b.id
> 
> In a statement as simple as this, I always get the same output, but when I
> add in a few more JOINS, sometimes I get different output.
> 
> Thanks
> 

Could you provide a full example?

-- 
Sasha Pachev
http://www.sashanet.com
Thread
LEFT JOIN ON Clause moved to WHEREMichael Griffith27 Aug
  • Re: LEFT JOIN ON Clause moved to WHERESasha Pachev27 Aug
  • Re: LEFT JOIN ON Clause moved to WHEREThimble Smith27 Aug