db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: Concerning UNIQUE keys
Date Thu, 16 Aug 2007 15:03:48 GMT
>>>>>>>>>>>> adedayo damilola wrote (2007-08-16 14:05:27):
> After reading the Derby document(s) I discovered that the UNIQUE
> constraint in Derby does not allow NULL values to be inserted into a
> cloumn with the constraint applied. So I was wondering if there was
> another way to achieve since the UNIQUE constraint was designed to
> do this

UNIQUE on nullable columns is optional feature T591 in the SQL
standard and is not implemented in Derby.

There is some work going on and there is a fair chance that this will
be implemented for the next release.

If you want to achieve an enforcement of an unique constraint by other
means, I think it is possible to do it with a trigger, but it will not
be very performant.

-- 
Bernt Marius Johnsen, Database Technology Group, 
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway

Mime
View raw message