I have the following three tables:

ClassHeader
ClassID
Major

TeacherClasses
TeacherID
ClassID

StudentClasses
TeacherID
Major

I want to select all TeacherClasses where the a given Major = ClassHeader.Major

I have the following three tables:

ClassHeader
ClassID
Major

TeacherClasses
TeacherID
ClassID

StudentClasses
TeacherID
Major

I want to select all TeacherClasses where the a given Major = ClassHeader.Major

A user on another Forum gave me this solution which worked:

SELECT TeacherClasses.TeacherId, TeacherClasses.ClassId
FROM ClassHeader INNER JOIN TeacherClasses ON TeacherClasses.ClassID = ClassHeader.ClassID
WHERE ClassHeader.Major = 'BasketWeaving'