Different between primary key and unique key?
One table may have more than one Unique Key Constraint
columns, but should have only one Primary Key Constraint
column.
Unique key allow us NULL values where Primary key not allow us null values.
The key difference when you are developing and writing, is who you are writing for. The code you write is generally for yourself to reuse as and when need be. When you write, you write for an audience who will use your content and develop on them. This is my tryst to put down my learnings for others to use. And while doing so, refine those learnings making it beginner friendly.
One table may have more than one Unique Key Constraint
columns, but should have only one Primary Key Constraint
column.
Unique key allow us NULL values where Primary key not allow us null values.