SQL Primary Key vs Foreign Key


#1

https://www.codecademy.com/courses/learn-sql-multiple-tables/lessons/multiple-tables/exercises/primary-key?action=resume_content_item&course_redirect=learn-sql

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?


#2

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.