Computer Science, asked by neetu5564, 11 months ago

DIFFERENCE BETWEEN PRIMARY KEY AND FOREIGN KEY

Answers

Answered by Toshika654
4

hi

buddy ✌️✌️✌️✌️

❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

✴️. Primary keyuniquely identify a record in the table. Foreign key is a field in the table that is primary key in another table. By default, Primary key is clustered index and data in the database table is physically organized in the sequence of clustered index. ✏️✏️

❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

Brain list pls❤️❤️❤️

@toshika

#follow me#

Answered by amarjeetk9988
3

Answer:

BASIS FOR COMPARISON PRIMARY KEY FOREIGN KEY

Basic Primary Key is a chosen candidate key that uniquely defines a tuple in a relation. Foreign key in a table refers to the primary key of other table.

NULL Primary key value can never be NULL. Foreign key accepts NULL value.

Duplicate No two tuples in a relation carry duplicate values for a primary key attribute. Tuples can carry duplicate value for a foreign key attribute.

Range There can be only one primary key of a relation. There can be multiple foreign keys in a relation.

Temporary Table Primary key constraint can be defined on the temporary tables. Foreign Key constraint can not be defined on the temporary tables.

Explanation:

Similar questions