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 difference between joins and union?
What are the three forms of normalization?
What is sql keyword?
Do foreign keys improve performance?
What is on delete restrict?
Why do we need cursor in pl sql?
What is a stored procedure in sql with example?
What is a primary key called that is made up of more than one field?
How to move files from one directory to another in pl sql?
how to use case expression? : Sql dba
How do I find duplicates in sql?
how would concatenate strings in mysql? : Sql dba
what are the properties and different types of sub-queries? : Sql dba
How to change sql*plus system settings?
What is pls integer?