[_] MySQL is crap
Richard Davey
rich at corephp.co.uk
Mon Oct 2 12:26:38 BST 2006
Matthew Wilkes wrote:
> Spent ages trying to work out where our syntax error was, turned out it
> doesn't support FULL OUTER JOIN.
>
> Do any MySQL gurus know what the most efficient way of simulating the
> functionality would be? I was thinking UNIONing a LEFT and a RIGHT
> OUTER JOIN. Does this seem sane?
Sure, why not? Your solution would effectively return results from the
inner join, minus the non-corresponding rows in A <> B, which is exactly
what a full outer does anyway. I'm sure there is an example of this in
the MySQL help files.
Cheers,
Rich
PS - Do you write digg.com headlines for a past-time or something?
--
Zend Certified Engineer
http://www.corephp.co.uk - PHP Development Services
> Spent ages trying to work out where our syntax error was, turned out it
> doesn't support FULL OUTER JOIN.
>
> Do any MySQL gurus know what the most efficient way of simulating the
> functionality would be? I was thinking UNIONing a LEFT and a RIGHT
> OUTER JOIN. Does this seem sane?
Sure, why not? Your solution would effectively return results from the
inner join, minus the non-corresponding rows in A <> B, which is exactly
what a full outer does anyway. I'm sure there is an example of this in
the MySQL help files.
Cheers,
Rich
PS - Do you write digg.com headlines for a past-time or something?
--
Zend Certified Engineer
http://www.corephp.co.uk - PHP Development Services