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 scalar data type in pl sql?
What is sql injection owasp?
Explain exception handling in pl/sql?
What is dense_rank in sql?
What is difference between table and view?
Can %notfound return null after a fetch?
How do you remove duplicates without using distinct in sql?
Can we alter stored procedure?
What is serial sql?
how to do backup entire database? : Transact sql
What are sql*plus environment variables?
Why use triggers in sql?
What is composite primary key in sql?
What are string functions in sql?
How do I edit a trigger in sql developer?