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
how many values can the set function of mysql take? : Sql dba
Why commit is not used in triggers?
What is use of term?
what are the differences between char and nchar? : Sql dba
Define commit, rollback and savepoint?
How do I run a sql query in pgadmin 4?
1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins
Can I call a procedure inside a function?
How do I view a table in sql?
How do I access sql anywhere database?
What is the purpose of a sql?
Why is partition used in sql?
What is the max nvarchar size?
What is the difference between functions, procedures, and packages in pl/sql?
What is sqlca in db2?