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

No, I think unique constraint contain no duplicate value in
a column. There are only contains unique value

Is This Answer Correct ?    0 Yes 1 No

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

Answer / rammohan176

yes Unique constraint accept more than one null.... because null is always not equal to another null value.i.e null<>null.
if any body have doubt please check this
CREATE TABLE TEST1 ( ENO NUMBER CONSTRAINT EU UNIQUE,
NAME1 VARCHAR2(10))

INSERT INTO TEST1 (NAME1) VALUES('RAM')

INSERT INTO TEST1 (NAME1) VALUES('KARTHIK')
INSERT INTO TEST1 (NAME1) VALUES('SANTHOSH')
INSERT INTO TEST1 (NAME1) VALUES('SANDY')

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SQL Server Interview Questions

What is Stored Procedure? What is Views in sql server? Difference between a User Defined Function and a Stored Procedure Difference between a primary key and a unique key? What is a join and explain different types of joins. Difference between temp table and table variable Difference between Triggers and Stored Procedures Difference between UNION ALL Statement and UNION What is COALESCE / Why do we use COALESCE? Why we use SET ROWCOUNT in Sql How many clustered index can have a table How many types of local tables in SQL SERVER Difference between DELETE and TRUNCATE What is Aggregate Functions? What is Row_Number()? What are Ranking Functions? What is NOLOCK? What is CTE? What are the Advantages of using CTE? What is the STUFF function and how does it differ from the REPLACE function? What are the difference between clustered and a non-clustered index? What are the different index configurations a table can have? Difference between a HAVING CLAUSE and a WHERE CLAUSE? Difference between SET and SELECT Provide all the built in string function of SQL SERVER Difference between char and varchar data types Define candidate key, alternate key, composite key. What are constraints? Explain different types of constraints. What is a self join? Explain it with an example. How will you convert table row to a column comma separated value

4 Answers   ACS,


How many clustered indexes there can be on table ?

0 Answers  


What is the largest component inside a field?

0 Answers  


Define compound operators?

0 Answers  


Lets say due to N/W or Security issues client is not able to connect to server or vice versa. How do you troubleshoot?

1 Answers  






What is checkpoint process in the sql server?

0 Answers  


What are various ways to enhance the ssrs report?

0 Answers  


What command do we use to rename a db?

5 Answers   IBM,


What is database isolation in sql server? : sql server database administration

0 Answers  


What does indexation mean?

0 Answers  


how to rest identity columns in sql server

3 Answers   Matrix,


What does the not null constraint do?

0 Answers  


Categories