IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS
NULL VALUES AND DUPLICATE VALUES..INSTEAD OF PRIMARY KEY
WHY CANT WE USE UNIQUE AND NOT NULL.THESE TWO ALSO DOESNT
ACCEPT NULL VALUES IN NOT NULL AND UNIQUE DOESNT ACCEPT
DUPLICATE VALUES?
SO WHAT IS THE DIFEERENCE BETWEEN(UNIQUE,NOT NULL) AND
PRIMARY KEY??????
Answer Posted / upendra
Primary key creates Clustered Indexes. Clustered indexes physically sort the data.
Unique can have only Non-clustered indexes, where data are not physically sorted.
| Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
How does left join work in sql?
How many clustered indexes can be created on a table?
What is the difference between clustered and non-clustered index in sql?
What are the different types of joins in sql?
What is the non-clustered index in sql?
What is union, minus and interact commands?
How to display Row Number with Records in Oracle SQL Plus?
What is duration in sql profiler trace?
What is pivot table in sql?
What is the difference between partition and index?
What is dml with example?
What are the advantages of pl sql over sql?
Can you rollback after commit?
what is self-join? : Sql dba
What are the operators used in select statements?