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
Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)?
What is the difference between function, procedure and package in pl/sql?
What are reports usually used for?
Are sql database names case sensitive?
What is nvarchar max in sql?
What are the limitations of sql express?
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
What is the use of primary key?
What is sharding in sql?
Does db2 use sql?
What are sql*plus environment variables?
Is pl sql different from sql?
What is dynamic sql in pl sql?
How much ram can sql express use?
How can we find duplicate records in a table?