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 gpt format?
What is cross join sql?
what are enums used for in mysql? : Sql dba
What does truncate mean in sql?
What is acid property in a database?
Is left join same as join?
How run sql*plus commands that are stored in a local file?
If the application is running very slow? At what points you need to go about the database in order to improve the performance?
how can we submit a form without a submit button? : Sql dba
What is difference between hql and sql?
Explain isolation levels. : Transact sql
What is identity column in sql server?
What is an example of translating a date into julian format?
What is rownum in sql?
Why is a primary key important?