Re: UNIQUE and NULL in SQL

From: Andreas Bauer <baueran_at_in.tum.de>
Date: Sun, 30 Dec 2001 14:19:17 +0000
Message-ID: <MuEX7.7635$ny3.1201964084_at_news.tli.de>


On Sun, 30 Dec 2001 03:28:12 +0000, Brian Smith wrote:

> What is the rationale for having a UNIQUE constraint treat NULLS as
> equal?

What would be the rationale behind UNIQUE if it was any different to this? That is, what makes the first NULL different to your second NULL?
> I want the fourth insert statement above to succeed while still
> enforcing the UNIQUE constraint for non-null columns. Is that possible?

I would not know how to do it, leave alone implementation in any real world DBMS.

-- 
Andreas Bauer, baueran at in.tum.de, http://home.in.tum.de/baueran/
"Well, I would describe him as sorta human shape, he's got blue jeans, a
shirt on...." -- Derek in Bad Taste
Received on Sun Dec 30 2001 - 15:19:17 CET

Original text of this message