Reputation: 639
I've googled about the differences between pk and uk. I've read QA on stackoverflow regarding the pk and uk.
Can please anyone in simple terms briefly tell me in what situation would i be preferring pk over uk or vice -versa.
Regards, Ankit
Upvotes: 0
Views: 99
Reputation: 910
If your column has all the distinct values and all not null values, use primary key and if it can insert only one null value along with all other distinct values, consider using unique key.
Upvotes: 1