1
What is the difference between a primary key and a secondary key?
1
A Primary Key is a unique identifier for each record within a table, must be unique and not null, and a table can only have one. A Secondary Key is any key other than the primary key that uniquely identifies or partially identifies a record within a table. A table can have multiple secondary keys. Key differences include: Primary keys must be unique, while secondary keys may not be. A table can have only one primary key, but multiple secondary keys. Primary keys uniquely identify records, while secondary keys can be used for efficient data retrieval and may not always be unique.
0
|
1
A primary key uniquely identifies each record, while a secondary key is used for searching but may not be unique.
0
|