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
Difference between global and parameter variables?
Explain lock escalation? : Transact sql
What is $$ in sql?
What are sql procedures?
how is myisam table stored? : Sql dba
What is sql architecture?
does sql support programming? : Sql dba
What is a schema? How is it useful in sql servers?
What is sql and how does it work?
What are the uses of sysdate and user keywords?
what is rdbms? : Sql dba
how to present a past time in hours, minutes and seconds? : Sql dba
What is user in sql?
What is sql catalog?
how to convert numeric values to character strings? : Sql dba