Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: UNION and WHERE
Sure you can...
SELECT field1, field2 FROM table1
WHERE field3 = 'something'
UNION
SELECT field1, field2 FROM table1
WHERE field3 = 'something else'
As long as the SELECT statements you are uniting ("UNION"ing) have field lists that have the same number of fields, each having the same type as its corresponding field in the other field list, a UNION will work. While the SELECT statements above are both from the same table, they can be from different tables. You could also combine more than two SELECT statements with UNION if you want. Check out the documentation for more info.
HTH,
-Jeff
On Thu, 13 Jan 2000 14:18:57 +0100, "Olivier BRUZEAUX" <obruzeau_at_telecom.capgemini.fr> 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:36:57 CST
![]() |
![]() |