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

前端 未结 11 1947
孤城傲影
孤城傲影 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:11

    NOT NULL means Any entry in that particular column should not be null. UNIQUE means Each entry in the column should be distinct. PRIMARY KEY means Any entry in the column should be distinct and not null.

    So simply..

      PRIMARY KEY= UNIQUE + NOT NULL
    

提交回复
热议问题