What is a primary key, and how is it different from a unique key?
Answer Posted / nashiinformaticssolutions
• 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
Is trigger a stored procedure?
What is procedure and function in sql?
How sql query is executed?
How do you remove duplicates without using distinct in sql?
Explain commit, rollback and savepoint.
Can I create table without primary key?
What is the use of sqlerrd 3?
How can we debug in PL/SQL?
Does inner join remove duplicates?
What does t sql mean?
how to convert character strings to numeric values? : Sql dba
What is a boolean in sql?
How to avoid duplicate records in a query?
explain normalization concept? : Sql dba
Mention what plvcmt and plvrb does in pl/sql?