Re: The NULL in Oracle 7.3

From: Pierre Charpenay <pierre.charpenay_at_unilog.fr>
Date: Wed, 01 Aug 2001 12:55:36 +0200
Message-ID: <3B67E028.9DAA6271_at_unilog.fr>


TurkBear a écrit :
>
> Some rough info:
>
> NULL is (sorry) NULL..
> Its is a special value ( actually not a value, but...) for NO DATA - it is different from a blank
> ( a blank in a varchar2 is " "; NULL is equivalent to "" )
> DATE fields must be BLANK if no date entered, not NULL

You can find NULL (means nothing) in every type of data (VARCHAR2, DATE, NUMBER, ...)
> NULL cannot be used in 'normal' comparison operators (=,>,<,etc)
> It is equal to nothing, it is NOT EQUAL to nothing, it has no > or < values to check against

If you use NULL or a column containing NULL in a classical test, the result is UNDETERMINED (not true, not false).

> The only operators are IS NULL and IS NOT NULL
> You can use the NVL(possiblenull) function to handle it in formulas..

Particularly if you test a column that can be NULL (for example "nvl(col, 0) = 0" is true if col = 0 or col is null)

> ...

NULL is very special in (group) operations too. See Oracle documentation for basis.

-- 
 Pierre CHARPENAY
Received on Wed Aug 01 2001 - 12:55:36 CEST

Original text of this message