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: UNION and WHERE

Re: UNION and WHERE

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Thu, 13 Jan 2000 14:19:10 GMT
Message-ID: <387DDEDE.DB9F6D80@edcmail.cr.usgs.gov>


The UNION clause "connects" two SELECT statments. Any SELECT statment can have a WHERE clause. So the answer to your question is yes. Something like:

   SELECT col1, col2
   FROM table1
   WHERE col1 = cond1
   UNION
   SELECT col1, col2
   FROM table2
   WHERE col2 = cond2;

HTH,
Brian

Olivier BRUZEAUX wrote:
>
> Hi,
>
> Is it possible to use UNION and WHERE in the same statement !!
> If it is possible do you have an example,
>
> Thank you
>
> Olivier
Received on Thu Jan 13 2000 - 08:19:10 CST

Original text of this message

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