what is difference between "Primary key" and "Unique key"?
Answer Posted / swapna
1)unique key can be null but primariy key cant be null.
2)primariy key can be refrenced to other table as FK.
Primary key and unique are Entity integrity constraints
Primary key allows each row in a table to be uniquely
identified and ensures that no duplicate rows
exist and no null values are entered.
Unique key constraint is used to prevent the duplication of
key values within the rows of a table and allow null
values. (In oracle, one null is not equal to another null).
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is sql in oracle?
Define a temp table?
What is structural independence and why is it important?
What is scalar function in sql?
What is self-join and what is the requirement of self-join?
What is a Mapplet?
What is a procedure in pl sql?
Can cursors be part of a trigger body?
How do I make my sql query run faster?
Define sql delete statement.
What is the difference between jpql and sql?
How can we solve sql error: ora-00904: invalid identifier?
What is sqlite format?
What is the difference between nvl function, ifnull function, and isnull function?
Why do we create views in sql?