Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

Explain in brief Primary and Foreign Key.

Asked by Helen Atkinson Dec 28, 2019 1.5K views 1 answer
Share

Your answer

1 Answer

Preetam Shetty JanBask Expert Latest answer

Answered on Nov 5, 2019

Primary Key - A primary key is used to identify each record uniquely by enforcing Unique, NOT NULL constraint on the column.

Foreign Key - A foreign key is used to refer to the primary key of another table for its related data in order to help connect the tables by reference.


Was this helpful?

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.