Highlight the differences between Primary Key and Primary Index.

DWQA QuestionsCategory: QuestionsHighlight the differences between Primary Key and Primary Index.
Editor Staff asked 1 month ago

Highlight the differences between Primary Key and Primary Index.

1 Answers
Editor Staff answered 1 month ago

Below is the differences between Primary Key and Primary Index.

  • Primary index is quite mandatory, whereas Primary Key is optional.
  • Primary Index has a limit of 64 tables/columns, whereas Primary Key does not have any limit.
  • Primary Index allows duplicates and nulls, whereas Primary Key doesn’t.
  • Primary Index is a physical mechanism, whereas Primary Key is purely logical mechanism.