Thanks for the suggestion.

This is not ideal for a couple of reasons: I'm using an object-relational
layer that would have to be hacked up something fierce, and my actual
query would be pretty hairy:

(select * from t1 where a=x
union select t1.* from t1,t2 where t1.b=t2.b and t2.c=y
union select t1.* from t1,t2 where t1.b=t2.b and t2.d=z
) order by e

I guess this is what a good optimizer would generate behind the scenes,
but it'd be nice not to have to know about it.

On Tue, 5 Aug 2003, Rudi Benkovic wrote:

> Have you tried using the UNION statement? That worked great for me.
>
> So, something like:
>
> (select * from sometable where f1 = 123)
> UNION
> (select * from sometable where f2 = 123)
>
> ?
>
> --
>
> Rudi Benkovic           [EMAIL PROTECTED]
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to