Hi,
If I used UNION and INTERSECT in compound SELECTs, how to change the default priority?
   For example,
SELECT id FROM sample_a WHERE value > 3.0 INTERSECT SELECT id FROM sample_b WHERE value < 4.0 UNION SELECT id FROM sample_b WHERE value > 7.0; The default results is that it makes the intersection firstly and then makes the union. If I want the union occurs before the intersection, what should I do?
   I add "(" and ")" to change priority like this:
SELECT id FROM sample_a WHERE value > 3.0 INTERSECT (SELECT id FROM sample_b WHERE value < 4.0 UNION SELECT id FROM sample_b WHERE value > 7.0);
   But I got an error:
      SQL error: near "(": syntax error.


Best regard,
Nan Ye


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to