Subject | Uniqueness among non-null values in nullable column? |
---|---|
Author | Kjell Rilbe |
Post date | 2012-04-24T07:40:12Z |
Hi,
Is there any way to enforce uniqueness of all non-nulls in a nullable
column?
The "business requirement" would be "this kind of thing has an optional
attribute, that, if it exists, is unique". For example, a company may or
may not exist in the Byro van Dijk company database, but if it does
exist it will have a unique BvD id. I'd like to enforce this uniqueness.
Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Is there any way to enforce uniqueness of all non-nulls in a nullable
column?
The "business requirement" would be "this kind of thing has an optional
attribute, that, if it exists, is unique". For example, a company may or
may not exist in the Byro van Dijk company database, but if it does
exist it will have a unique BvD id. I'd like to enforce this uniqueness.
Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64