Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Unique constraint and NULL values

Re: Unique constraint and NULL values

From: Frank Piron <empty_at_zero.nil>
Date: Fri, 22 Oct 2004 08:27:36 +0200
Message-ID: <opsf9dkan6m0et4w@news.online.de>


Thu, 21 Oct 2004 18:54:29 -0700 DA Morgan <damorgan_at_x.washington.edu> wrote:

> Two nulls should never be evaluated ... there is nothing to consider.
> So considering them the same or different is irrelevant.
>
> CREATE TABLE t (
> col1 NUMBER(1),
> col2 VARCHAR2(1),
> col3 DATE);
>
> INSERT INTO t (col1) VALUES (1);
> COMMIT;
>
> What sense would it make to compare col2 and col3?
> Would you consider them the same?

No. I wanted to stress the fact that
eval(NULL=NULL) "=" eval(NULL<>NULL) "=" "NULL" where the doublequotes indicate metalanguage.

Unlike true and false, NULL acts on both levels because it can be a column's "value" and can be the result of a logical expression.

-- 
Frank Piron,
etfrankatkonaddotn
(leftrotate two)
Received on Fri Oct 22 2004 - 01:27:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US