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: Diff. between UNION and UNION ALL

Re: Diff. between UNION and UNION ALL

From: Oliver Felix Fox <off_at_Copenhagen.NCR.COM>
Date: 1997/03/05
Message-ID: <01bc2972$464133a0$ba2b4699@l174>#1/1

A (very) simple expample:

select * from dual
union
select * from dual;

returns 1 row (duplicates removed):
X

select * from dual
union all
select * from dual;
returns 2 rows (doesn't remove duplicates): X
X

Just in case: Dual is a "builtin" single column single row table and that columnvalue is 'X'



Oliver Felix Fox, International Oracle CoE NCR SE - Copenhagen
E-mail: Oliver.Fox_at_Copenhagen.ncr.com

Naren Chintala <naren_at_mink.att.com> wrote in article <33172CE3.FF3_at_mink.att.com>...
> Hi,
>
> What's the difference between UNION and UNION ALL (in a SELECT
> statement). I don't find any info on this in the Oracle manuals. Would
> some explain this with a simple example.
>
> TIA
>
> Naren
>
  Received on Wed Mar 05 1997 - 00:00:00 CST

Original text of this message

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