List:General Discussion« Previous MessageNext Message »
From:Jason Landry Date:March 20 2001 7:59pm
Subject:Re: Small select question...
View as plain text  
You'll have to be more specific in your example -- your select statement
below is rather ambiguous.

However, take a look at the CASE WHEN...THEN functions that MySQL offers.
I'm sure it's exactly what you are looking for.


----- Original Message -----
From: "Bryan Coon" <bcoon@stripped>
To: <mysql@stripped>
Sent: Tuesday, March 20, 2001 1:30 PM
Subject: Small select question...


> Hopefully this is not too lame a question...
>
> In oracle, I can do this:
>
> select a, b, c from A, B, C where a = A.a (+) and b = B.b (+) and c = C.c;
>
> What is the equivalent in MySQL?  The (+) allows that 'where' statement to
> be kind of optional (I think). Basically I want to do a select on multiple
> tables and if one of the 'where' statements doesn't match anything, the
> query still returns values for other statements that did (e.g. if a = A.a
is
> not true, but b = B.b is, I want to return B.b).
>
> Thanks!
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread68897@stripped>
> To unsubscribe, e-mail
<mysql-unsubscribe-jason=appliediq.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

Thread
Small select question...Bryan Coon20 Mar
  • Re: Small select question...Jason Landry20 Mar
RE: Small select question...Bryan Coon20 Mar
  • Re: Small select question...Geoff Coffey20 Mar