SELECT SubjectID, DepartmentID, SubjectName, SubjectDescription, SubjectShortCode FROM BS_Subject WHERE NOT EXISTS (SELECT SubjectToClassID FROM BS_SubjectToClass WHERE BS_Subject.SubjectID = BS_SubjectToClass.SubjectID AND BS_SubjectToClass.ClassID =2)
プレ>