Difference between Primary key and Foreign Key

Total Post:46

Points:324
SQL 
 729  View(s)
Ratings:
Rate this:
Hi Guys
I am littlebit confuse about primary key and foreign key while i read online  related blogs and articles.I don't understand clear difference between primary key and foreign key.Please clear me difference between primary key and foreign key

Thanks

  1. Post:26

    Points:182
    Re: Difference between Primary key and Foreign Key

    Here is a some Difference between primary key and Foreign key

    Primary key-

    A table can have one primary key.

    It cannot accept duplicate values.

    It is default clustered index

    It cannot accept null value

    Foreign Key-

    Default is Non_Clustered Index

    A table can have more than one foreign key

    It can accept duplicate value.

    It accept null value.

    It provide link between data in two table.

      Modified On Apr-11-2018 06:20:44 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!