Anonymous
Asked in
Cars &Transportation
ยท
2 weeks ago
IS NULL value allowed in unique key?
Contents
- Can we store null value in unique key column?
- How many NULL values can be stored in a unique key column?
Can we store null value in unique key column?
The primary key column cannot have null values while the Unique Key column can have one null value.
How many NULL values can be stored in a unique key column?
As you know, when you create a UNIQUE constraint on a nullable column, SQL Server allows only one NULL value, thereby maintaining the UNIQUEness. However, there are situations when we need more than one NULL value in the column but still have to maintain uniqueness, ignoring all those NULL values.
Related Questions
Relevance
-
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago
Write us your question, the answer will be received in 24 hours