select 课程表.课程 from 课程表, 系主任表 where 系主任表.系主任 = d1 and 系主任表.教师 = 课程表.教师
这是我写的查询语句,至于jdbc,就等其它大侠帮你了.