Re: Differences between DECODE and 9i's CASE

From: D.Y. <dyou98_at_aol.com>
Date: 13 Feb 2003 13:14:12 -0800
Message-ID: <f369a0eb.0302131314.5398a82a_at_posting.google.com>


"Gorm" <andreas_at_spiqu.com> wrote in message news:<eRN2a.10600$FF4.629793_at_newsb.telia.net>...
> The CASE expression can NOT return NULL, which DECODE can!
>

Actually it can,

SQL> select case when 1=2 then 1 else null end from dual;

CASEWHEN1=2THEN1ELSENULLEND


1 row selected.

> //Andreas Sandgren
>
>
> "Peter Shankey" <oxmard.Rules_at_ab.ab> wrote in message
> news:qx2cnViOF8yT79SjXTWc3w_at_comcast.com...
> > The CASE expressions and the function DECODE seem to do the same thing.
 What
> > are the advantages of one over the other?
> >
> >
Received on Thu Feb 13 2003 - 22:14:12 CET

Original text of this message