What is the difference b/w Primary Key and Unique Key

前端 未结 11 1977
孤城傲影
孤城傲影 2020-12-24 13:07

I tried to find it out in google but not satisfactory answer is given out there. Can anybody explain the solid difference.

actually if Primary key is used to sele

11条回答
  •  清酒与你
    2020-12-24 13:19

    Both are representing a unique identification to a row in a table but there is little bit difference is that

    PRIMARY key does not allows NULL values

    while

    UNIQUE key allows only one NULL values.

    that is the main difference ..

提交回复
热议问题