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 / gazulas
if it is Primary key then we can make use foreign key in other table and can use the referential integrity concept
for unique keys we dont have that.
| Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
How do I order by ascending in sql?
Explain what is an index?
Does sql*plus have a pl/sql engine?
Can there be more than one function with a similar name in a pl/sql block?
how to select unique records from a table? : Sql dba
Is it possible to create startup or shutdown trigger for on-schema?
How do I upgrade sql?
What are the two types of cursors in pl sql?
What is cursor and why it is required?
What is the use of <> sql?
How can we link a sql database to an existing android app?
what are the disadvantages of mysql? : Sql dba
Why left join is used in sql?
What problem one might face while writing log information to a data-base table in pl/sql?
What is the difference between partitioning and sharding?