What is Key in SQl-Server?

Unique Key
  • The field must be unique within it’s Column.
    Primary Key

  • A Combination of unique & not null.

  • A table has Only one Primary Key.

    Foreign Key

  • Define relationship between two Table.

  • Either one to one, one to many, many to many

    Candidate Key

  • A table may have more than one combination of columns that could uniquely identify the rows in a Table, each combination is a Candidate Key.
  • A candidate Key is one that can identify each rows of a table uniquely.

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha *