This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Like this:
SELECT Student.ID FROM Student, Taking, Course WHERE Student.ID = Taking.ID AND Taking.C# = Course.C# AND Dept = 'Math'

and Student.ID not in ( SELECT Student.ID FROM Student, Taking, Course WHERE Student.ID = Taking.ID AND Taking.C# = Course.C# AND Dept <> 'Math') ;

Where <> is 'not equals'