Unique Constraint in SQL
Can anyone tell me why does a column having Unique Constraints can not contain two null values?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prabhu RajaPosted Oct 10, 2011, 3:03 AM
Unique Key will Generate Non-Clustured Index.
UNIQUE Key can have only one NULL in Sql server (For Oracle : Unique key may have more then one null values because null is equal to another null)
Pravin PatilPosted Oct 10, 2011, 2:23 AM
Pravin PatilPosted Oct 10, 2011, 2:23 AM
With this it is quite clear that since null is also a value, there can not be two students who have phone as value with NULL.
Hope this helps.
All the best.
Mamta MPosted Oct 10, 2011, 12:22 AM