Pergunta de entrevista da empresa Bridgenext

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

Respostas da entrevista

Sigiloso

16 de nov. de 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

Sigiloso

29 de jun. de 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.