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 are the usages of sql?
What does a pl/sql package consist of?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
Why is partition used in sql?
How to write pl sql program in mysql command prompt?
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
What is sorting in sql?
What are the advantages of pl sql over sql?
What is trigger in sql? Explain
Explain the uses of a database trigger?
How do you pronounce sql?
How do you use a while loop in pl sql?
What is dynamic query?
Why do we use partitions in sql?
how can we destroy the session, how can we unset the variable of a session? : Sql dba