Question d’entretien chez Bridgenext

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

Réponses aux questions d'entretien

Utilisateur anonyme

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

Utilisateur anonyme

29 juin 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.