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
How do you remove duplicates without using distinct in sql?
what are ddl statements in mysql? : Sql dba
How do I find duplicates in the same column?
How do I add a primary key to a table?
Can you join a table to itself?
What are the limitations of sql express?
Is ms sql traffic encrypted?
What is an index in sql with example?
Can a procedure in a package be overloaded?
What are its different types of dbms?
What is the difference between inner join and outer join?
What are the types of dbms?
Explain architecture of sql server notification services?
What is materialized view. What are different methods of refresh?
Is it possible to include an insert statement on the same table to which the trigger is assigned?