Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / kalu

No, because Unique constraint accepts only one null value.

Is This Answer Correct ?    16 Yes 3 No

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

Answer / saurabh

no

Is This Answer Correct ?    11 Yes 5 No

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

Answer / p.prabhu

No we cant have More than One Null in a column which is
having Unique Key Constraint. Because Unique Key Constraint
means having a value only once in the column.

Is This Answer Correct ?    4 Yes 1 No

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

Answer / santhoshkumar.k

No we can not have that option in sql server

Is This Answer Correct ?    4 Yes 2 No

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

Answer / krishnaraj p n

UNIQUE constraints can accept NULL just once. If the
constraint is defined in a combination of fields, then
every field can accept NULL and can have some values on
them, as long as the combination values is unique.

Is This Answer Correct ?    2 Yes 0 No

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

Answer / 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

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

Answer / maneesh

Yes there can be any number of NULLs.
Remember NULL <> NULL.

So uniqueness will still be there.

Just try it out.

Maneesh

Is This Answer Correct ?    6 Yes 6 No

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

Answer / habibur rahaman

It depends upon the database on which you are working.....in SQL we can have only one value but in oracle we can have n no of values.......i did it practically.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / sasikumar

It is possible in Oracle database (NULL <> NULL) but not
possible in SQL server.

Is This Answer Correct ?    1 Yes 1 No

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

Answer / drona

UNIQUE constraints can accept NULL just once.
I have a dought?
Every null is different?

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is extended stored procedures?

0 Answers  


what is hash nonclustered index

0 Answers  


What do you mean by acid?

0 Answers  


About types of indexes in SQL server ?

2 Answers   Cognizant,


if 3 duplicate records in a table,i want to delete 2 duplicate records by keeping 1 as it is,how?

1 Answers  


what is the cursor life span?

5 Answers   Evalueserve, HG,


how you can list all the tables in a database?

0 Answers  


What is Lock table in SQL?

0 Answers   Wipro,


What is transact-sql ddl trigger?

0 Answers  


What is a coalesce function?

0 Answers  


What is the maximun sixes of .mdf in sql server 2005

1 Answers  


Can we hide the definition of a stored procedure from a use?

0 Answers  


Categories