假设子查询返回的多个值为A,B, C ,另一个子查询返回的多个值的集合为S,则:
select A, B, C from XX where (A in S)and(B in S)and(C in S)
这要看你的表结构是怎么设计的了,如果选修课的表有课程类型,那么直接通过类型判断就行了
如果没有,那么就得关联课程表做判断
select * from (select lesson from table1 where studentId = 'abcd1234') as a where a.lesson in(select lesson from table2 where lessonType = '人文课程')
(子查询结果集) in (另外一个子查询)