Can we have more than one NULL in a column having unique
constraint?

Answer Posted / manoj pandey

No this is not possible... columns with Unique constraint
can only contain 1 null value/row.

@Manish... could you please try this:

create table #tempTable (id int, name varchar(50) unique)

insert into #tempTable
select 1, 'manoj' union
select 2, null union
select 3, null union
select 4, 'pandey'

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the steps you should follow to start sql server in single-user mode?

557


What are data files?

665


What is SQL Azure?

93


What are logical/boolean operations in ms sql server?

619


What are a scheduled jobs?

625






what changed between the previous version of sql server and the current version? : Sql server database administration

617


What is #table in sql server?

618


Define normalisation?

775


tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

648


What is a view in sql?

664


what are the critical issues you have resloved in your company

1632


What is server-level principal?

108


Explain what are sparse columns?

653


What is the difference between migration and upgradation in sql server?

685


What do you mean by acid?

686