Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Diff. between UNION and UNION ALL
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'
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