Engaged Employer
Can you explain the difference between a primary key and a unique key in SQL, and can a table have multiple unique keys?
Anonymous
Yes, a table can have multiple unique keys but only one primary key. The main difference is that a primary key uniquely identifies a row and cannot accept NULL values, whereas a unique key prevents duplicates but can accept a single NULL value depending on the database system.
Check out your Company Bowl for anonymous work chats.