List:General Discussion« Previous MessageNext Message »
From:Harald Fuchs Date:February 23 2005 5:33pm
Subject:Re: UNIQUE Key Allowing Duplicate NULL Values
View as plain text  
In article <DA749670ABB17C4994D03B34889179D8228EEB@stripped>,
"Gustafson, Tim" <tjg@stripped> writes:

> Martijn,
> The problem is that I don't want more than one row in the table that has
> a null value in the column.  As you've pointed out in your e-mail,
> there's a difference between NULL and BLANK.  It's not that I don't want
> NULL values, it's that I don't want MORE THAN ONE.

You really should change your requirements.  Since NULL != NULL, every
DB enforcing a single NULL row by a unique index would not be SQL.
You seem to want "some special value" to occur only once, but NULL is
no value at all.  Can't you make 0 or "" (the empty string) that
"special value"?

Thread
UNIQUE Key Allowing Duplicate NULL ValuesTim Gustafson22 Feb
  • Re: UNIQUE Key Allowing Duplicate NULL ValuesPaul DuBois22 Feb
RE: UNIQUE Key Allowing Duplicate NULL ValuesTim Gustafson23 Feb
  • RE: UNIQUE Key Allowing Duplicate NULL ValuesPaul DuBois23 Feb
RE: UNIQUE Key Allowing Duplicate NULL ValuesTim Gustafson23 Feb
  • Re: UNIQUE Key Allowing Duplicate NULL ValuesMartijn Tonies23 Feb
RE: UNIQUE Key Allowing Duplicate NULL ValuesTim Gustafson23 Feb
  • Re: UNIQUE Key Allowing Duplicate NULL ValuesMartijn Tonies23 Feb
  • Re: UNIQUE Key Allowing Duplicate NULL ValuesHarald Fuchs23 Feb
Re: UNIQUE Key Allowing Duplicate NULL ValuesMartijn Tonies23 Feb