What is a primary key, and how is it different from a unique key?
Answer Posted / hr@tgksolutions.com
• Primary Key:
o Ensures each row in a table is unique.
o Cannot contain NULL values.
o A table can have only one primary key.
• Unique Key:
o Ensures all values in a column are unique.
o Can contain a single NULL value.
o A table can have multiple unique keys.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how to create a new view in mysql? : Sql dba
What is consistency?
What is a join?
What is write ahead logging in sql server?
What are the uses of merge?
How does postgresql compare to mysql?
Difference between truncate, delete and drop commands?
Which command is used to delete a trigger?
How many types of literals are available in pl sql?
Can we commit inside a trigger?
How do you modify a table in sql?
How many columns should be in an index?
How to sort the rows in sql.
How can you create an empty table from an existing table?
What are the two types of exceptions.