Possible Duplicate:
SQL Server UNIQUE constraint with duplicate NULLs
In Sql Server I would like to have a column that has both nulls and real values. If the column has a value, I want to insure it is unique. The column could have multiple rows with null for this column.
For example suppose I had a table of books with 3 columns, namely:
Book Number - identity
Title - varchar
ISBN - char
Now the table would have a primary key with the identity column, which is good. The question would be on the ISBN column. I do not want any ISBN number to appear in the table more than once, but there will be many books with no ISBN number (since I don't know it).
Is there any way (or what is the best way) to inforce this constraint on ISBN?