Simple Join Query Driving me nuts
Posted: Fri Apr 17, 2009 4:57 am
I have two tables, students and europeans. I would like to get a list of students that ARE NOT europeans.
I can get a list of the ones that ARE europeans by doing the following:
SELECT * FROM STUDENTS a, EUROPEANS b where a.student_id = b.student_id
but how do I get the list of the ones that ARE NOT? It is 2:40AM and my brain is not working anymore.
I can get a list of the ones that ARE europeans by doing the following:
SELECT * FROM STUDENTS a, EUROPEANS b where a.student_id = b.student_id
but how do I get the list of the ones that ARE NOT? It is 2:40AM and my brain is not working anymore.
Code: Select all
STUDENTS
student_id | name
1 | Mary
2 | John
3 | Adam
4 | Mark
EUROPEANS
id | student_id
1 | 2
2 | 4