Hi,


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.

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

Regards,
MC
-- 
Marie-Christine Fauvet          University of Grenoble
Visiting Fellow at the University of New South Wales
UNSW - School of Computer Science & Engineering
Sydney NSW 2052 Australia
Tel: 61 (2) 9385 7201           Fax: 61 (2) 9385 5533
[EMAIL PROTECTED]        http://www.cse.unsw.edu.au/~mcfauvet

---------------------------------------------------------------------
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