What is the difference between a primary key and a foreign key?

Query By: USHA MISHRA

M

Mukul Ojha

Primary Key -

A table can have only one primary key

Primary Key column can't store null values

Primary key Uniquely identifies each row in a table

Foreign Key -

A Foreign Key is a key used to link two tables together.

Foreign Key is a column that references a column (most often the primary key) of another table.

0 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)