Re: About NVL
Date: Wed, 04 Aug 1999 13:50:08 +0100
Message-ID: <37A83700.CF74373A_at_itacs.strath.ac.uk>
Kanson Ku wrote:
> HI ALL
>
> Is there anyone can tell me about the format of NVL
>
I am informed that "NVL" is an acronym of "Null Value Listing" .
As others have mentioned, the effect is to replace null value
elements with a substitute.
Note (with EMP table):
select ename, 12 * sal + nvl(comm,0) from emp;
The effect of the NVL function is to substitute any NULL values of comm by zero FOR THE PURPOSES OF THE EXPRESSION. If comm was not null, then its value would be used as if the NVL function wasn't there.
Note that the comm column is not changed by NVL. Also, the types of the first and second arguments must match (try nvl(comm,"No commission") and see how you get on! :-)
Hope this adds to the explanations of others.
Mungo
-- Mungo Henning - it's a daft name but it goes with the face... mungoh_at_itacs.strath.ac.uk.http://www.itacs.strath.ac.uk/ I speak for me, not my employer.Received on Wed Aug 04 1999 - 14:50:08 CEST