Answered Questions

  • What is difference between UNIQUE and PRIMARY KEY constraints?

    A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically defined to be mandatory must also specify the column is NOT NULL.

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Vijay Raj Jaiswal

    • Sep 20th, 2005


    Hi this is modified answer ,pls post this instead of previous which i post

    Primay Key                     Unique key

    -----------                  ------------------

    There is only one         there may be more than 1
    Primary key for           Unique Key in table
    1 table

    It can not contain           It Can contain Null Value
    Null value

    Lakshmanan

    • Jun 30th, 2017

    Primary key is combination of not null and unique. Primary key does not insert a null value and insert value is unique. Unique is one time accepted null value and insert a data is uniquely