Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL - UNION statement
Jan Nowitzky schrieb:
>
> Matthias Gresz wrote:
>
> > suisum_at_ecn.ab.ca schrieb:
> > >
> > > Hi all:
> > >
> > > Anyone know what the purpose of the following SQL statement? Why we need
> > > UNION?
> > > ...
>
> Hi Matthias,
>
> the difference is
>
> (1) e.disb_no = '000' and
> (2) e.disb_no != '000'.
> The reason could be NULL-Values!
>
> (1) supplies all disb_no which match the string '000'
> (2) supplies all disb_no which doesent match these string. Especially it means,
> that tupels with disb_no = NULL will not be selected!
To achieve only this you wouldn't need a UNION. 'e.disb_no is not null' would be enough. The real difference is what I pointed out yet.
>
> Regards,
> Jan
Regards,
Matthias
--
Matthias.Gresz_at_Privat.Post.DE
Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm
Received on Wed Dec 09 1998 - 02:34:34 CST
![]() |
![]() |