Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Unique constraint and NULL values
Walt wrote:
> "Mark C. Stock" wrote: > >
> >
> >
> > > > Sorry for being a bit late to the party here, but this is a question > that's bothered me for about 5 years, ever since I first "discovered" > it. > > Anybody have a good rationale *why* it works this way? It seems to me > that this should not be a violation of the uniqueness i.e. since it's > indeterminate whether (1,200,null) is a duplicate of (2,200,null) the > database should take it. I know the database won't, but I don't > understand the reasoning. > > Why the one-null-per-column requirement? Paraphrasing Frank Piron > (above) , it seems that Oracle is treating null as an identifying value, > which doesn't make sense to me.
Maybe I'm missing something but from the standpoint of your unique constraint why should it see 200, NULL and 200,NULL as being different? The primary key is irrelevant.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Thu Oct 28 2004 - 19:15:15 CDT