Thursday, October 28, 2021

Key Differences Between Primary key and Unique key

 

Key Differences Between Primary key and Unique key

1.    When an attribute is declared as a primary key, it will not accept NULL values. On the other hand, when an attribute is declared as Unique it can accept one NULL value.

2.    A table can have only a primary key whereas there can be multiple unique constraints on a table.

3.    A Clustered index is automatically created when a primary key is defined. In contrast, the Unique key generates the non-clustered index.

 

No comments:

Post a Comment

"🚀 Delta Lake's Vectorized Delete: The Secret to 10x Faster Data Operations!"

"🚀 Delta Lake's Vectorized Delete: The Secret to 10x Faster Data Operations!" Big news for data engineers! Delta Lake 2.0+ in...