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


Please Help Members By Posting Answers For Below Questions

What is the difference between left and left outer join?

680


What is a composite primary key?

763


What is oracle pl sql developer?

700


How to raise user-defined exception with custom sqlerrm ?

852


What is indexes?

742






What is sql keyword?

751


Why trigger is used in sql?

684


explain normalization concept? : Sql dba

781


What is an example of translating a date into julian format?

771


What is the difference between microsoft access and sql server?

704


What is the use of triggers?

729


what are numeric data types? : Sql dba

751


what is table? : Sql dba

758


Is mariadb nosql?

761


Explain raise_application_error.

828