Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: more than one union or intersect operator

Re: more than one union or intersect operator

From: janet <janet-SPAM-BLOCK_at_telesph.com>
Date: 1997/02/18
Message-ID: <330A1403.291F@telesph.com>#1/1

Wong Chung Yin wrote:
> If there are many "union" and "intersect" in a SQL statement, how can
> I state the precedence of union and intersect.

just like you state precendence in "and"s and "or"s: use parentheses.

(select id from database where keyword = 'computer'  union
 select id from database where keyword = 'science' )
intersect
select id from database where keyword = 'course'

HTH
janet

(for email remove -SPAM-BLOCK from address) Received on Tue Feb 18 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US