Re: Unique Constraint with Multiple NULLS
From: Joe \ <joe_at_bftsi0.UUCP>
Date: Thu, 1 Jan 2004 13:55:32 -0800
Message-ID: <1072994158.322794_at_news-1.nethere.net>
Date: Thu, 1 Jan 2004 13:55:32 -0800
Message-ID: <1072994158.322794_at_news-1.nethere.net>
"David Portas" <REMOVE_BEFORE_REPLYING_dportas_at_acm.org> wrote in message <news:G_2dncia7cWZCGmiRVn-uw_at_giganews.com>...
> > What is the SQL-92 standard for allowing multiple NULL values within a
> > unique constraint?
> A UNIQUE constraint treats NULLs in the same column as equal to each other.
> In other words UNIQUE(colX) will not be satisfied if colX contains more than
> one NULL value. This is consistent with the behaviour of other grouping
> operations like GROUP BY and DISTINCT.
However, this is also *in*consistent with the = and <> comparison operators within JOIN, WHERE, HAVING, etc. NULL as a concept is horribly broken and ruins the relational model as defined by Codd.
-- Joe Foster <mailto:jlfoster%40znet.com> Space Cooties! <http://www.xenu.net/> WARNING: I cannot be held responsible for the above They're coming to because my cats have apparently learned to type. take me away, ha ha!Received on Thu Jan 01 2004 - 22:55:32 CET
