平常我们写sql语句使用in函数基本上都是一个字段in一个字段

例如:

select * from Student where teacherId in (select id from Teacher)

其实也可以in多个字段,但是要一一对应

例如:

select * from Student where (id,Salary) in (select id,Max(Salary) from Student group by subject )