Rahul Chauhan

Rahul Chauhan

  • 1.2k
  • 479
  • 28.7k

I Have an doubt with unique, primary and foreign key?????

Jun 24 2021 10:55 AM

Primary Key:-   

  • The primary key is uniquely identifier in the table
  • The primary key is not more than once in the table.
  • The primary key needs a UNIQUE value and is not null.                                   

Foreign key:- 

  • The foreign key is used to make link b/w more than one table.
  • The foreign key is field/collection of fields which are primary key in another table fields.

Unique Key:-

  • The Unique key is same like primary key provide feature of uniqness .
  • All Value are different and unique in unique key fields. 

So my question is that----

  • there are any simple definition to define primary, foreign, and unique key in one paragraph????
  • What is different b/w Primary and foreign key????
  • What is different b/w Primary and Unique key????
  • What is different b/w Foreign and Unique Key????

Answers (4)