Primary Key Unique Key
It is used to serve as a unique identifier for each row within a table. Used to determine rows that are unique and not a primary key in a table.
It cannot accept NULL values. Unique Key can accept NULL values.
There is the only scope for one primary key in any table. Multiple Unique Keys can be defined within a table.
The primary key creates a clustered index. Unique Key creates a non-clustered index.

Note: Our PHP interview questions for freshers have been selected from a plethora of queries to help you gain valuable insights and boost your career as a PHP Developer.

Suggest An Answer

No suggestions Available!