我有多个表,但是对于这个查询,只需要两个表即Faculty和CourseSection。 我试过以下但失败了。如果有人可以帮忙。其他教师正在教授John Cullen正在教授的课程。SQL
Select faculty.firstname,faculty.lastname,CourseSection.facid,courseID
from CourseSection,faculty
where CourseSection.facid in(
Select CourseSection.CourseID
from CourseSection
where CourseSection.facid =Faculty.facid and firstname='John' AND lastname='Cullen')
发布您的表图式,将有助于确定如何在这里建立正确的说法 – Rogue
你试试我的答? –
是@knowledge ....但它不能正常工作 –