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

Home -> Community -> Usenet -> c.d.o.server -> Re: compound SQL queries and DISTINCT problem

Re: compound SQL queries and DISTINCT problem

From: Stephen Bell <stephen.bell_at_cgi.ca>
Date: Wed, 30 May 2001 08:00:04 -0400
Message-ID: <3B14E0C4.71EA098B@cgi.ca>

Hi Sten,
I'm not clear on exactly what you want..if you want the rows from BOTH tables you can use UNION or UNION ALL..

Steve

Sten Loecher wrote:

> Hi folks,
>
> I need to write compound queries like this:
>
> select * from some_table1
> minus
> select * from some_table2
>
> or:
>
> select * from some_table1
> intersect
> select * from some_table2
>
> The problem is, that I need all rows from some_table1 or some_table2
> respectivly. However, the minus and intersect operator returns only distinct
> rows from the according tables. The SQL standard allows for example
> INTERSECT ALL. Oracle do not provide this feature. Does anyone have an idea
> to get all rows without using predicates in the where clause of the
> statements ?
>
> Would appreciate any help.
>
> Sten
  Received on Wed May 30 2001 - 07:00:04 CDT

Original text of this message

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