Bridgenext Interview Question

Can there be multiple null values in column which have unique constraint set?

Interview Answers

Anonymous

Nov 16, 2013

No.But there are multiple workarounds, one of it is as follow CREATE UNIQUE INDEX indexName ON tableName(columns) INCLUDE includeColumns WHERE columnName IS NOT NULL

3

Anonymous

Jun 29, 2018

unique key constraint column allow only once null value. If we try to add another null value it shows an error as - can not insert null value.