"Marie-Christine Fauvet" <[EMAIL PROTECTED]> wrote:
> I'd like to program in the SQL language supported by MySQL the following
> query:
> 
> select R.A, R.B from R
> minus 
> select S.A, S.B from S
> 
> It doesn't work (syntax error, set operators are not supported).
> So, I've tried:
> 
> select R.A, R.B from R
> where not exists 
> (select * from S
> where S.A = R.A and S.B = R.B)
> 
> I've tried as well:
> 
> select R.A, R.B from R
> where (R.A, R.B) not in
> (select S.A, S.B from S)
> 
> Both of the above queries don't work.

MySQL doesn't yet support subselects.  I believe they're planned for v4.1.

> Does somebody have any idea about that? I want to avoid programming the
> minus operator in an host language ;-)

I think you may have to handle this in the application instead of the db.

-- 
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to