What is the difference between primary key and unique constraints?

111 Views

What is the difference between primary key and unique constraints?

SQL | Difference between primary key and unique constraints

There is only one primary key in a table. It creates the cluster index automatically and it cannot have NULL value
where as there can be multiple unique constraints in a table. It dose not creates the cluster index automatically and it can have NULL value

Tags:-
SQL
MySQL