SQL Primary Key vs Foreign Key



The link above contains the topic primary key and foreign key. It gives example of foreign key class_id in the table classes. It is the primary key in students. May I know what is the primary key in students? Is it ID or class_id?


id is the default primary key, so unless you changed the primary key, id is still the primary key of students.

adding a foreign key won’t change the primary key.