[Solved] Output student number that exists only on primary key but doesn’t exist on foreign key
[ad_1] This way you can select all students that are not found (by their id) in the grade table. SELECT * FROM student WHERE id NOT IN (SELECT student_id FROM grade) 1 [ad_2] solved Output student number that exists only on primary key but doesn’t exist on foreign key