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 / prativa mishra
We can create more unique key in a table but we can not create more then one primary key in a table.At the time of primary key creation thr is a clusterd index created automatically and it sorts data physically. It helps in searching process which not possible in unique+notnull column
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Does group by remove duplicates?
Can a varchar be a primary key?
What is the purpose of the partition table?
Why is a primary key important?
What is audit logout in sql profiler?
What does the file extension accdb stand for?
Explain what is a field in a database and record in a database?
how can we submit a form without a submit button? : Sql dba
how do you tune the slow running queries in oracle db , explain the methodology
Does inner join remove duplicates?
Which join condition can be specified using on clause?
What are the types of dbms?
What is rownum?
What is normalization? How many normalization forms are there?
what are the different type of sql's statements ? : Sql dba