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

1.What is the deferece between DBMS & RDBMS? 2.How can you trouble shoot? If u will get error while installing sql server? 3.How can u trouble shoot slow running query? 4.how can u trouble log shipping errors? 5.why do we use merge replication instead of T.log replication?

7 Answers   Microsoft,


What is the query optimization statistics?

1 Answers  


What is SQL Profiler and the use of it?

2 Answers   247Customer,


What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

11 Answers   World Tech, Yardi Software,


What is the difference between primary key and unique constraints?

0 Answers  






What are the aggregate and scalar functions?

0 Answers  


Display a roll having miminum marks in two subjects?

7 Answers   Patni,


What are diverse clauses that form a part of sql?

0 Answers  


Define the one-to-one relationship while designing tables.

0 Answers  


Where are SQL server users names and passwords are stored in sql server?

0 Answers   HCL,


What is optimization and its types?

0 Answers  


Is it true, that there is no difference between a rule and a check constraint?

0 Answers  


Categories