1.前言子查询分为嵌套子查询和相关子查询两类嵌套子查询:子查询总共执行一次,执行完毕将值返回主查询相关子查询:主查询执行一行,子查询执行一次,如此往复至主查询执行完毕2.嵌套子查询2.1.标量子查询 SELECT * FROM student WHERE score=(SELECT MAX(score) FROM student); SELECT * FROM student WHERE score>(SELECT AVG(score) FROM student); 2.2.列子查询 # SOME等价于ANY,IN等价于=ANY或=SOME,NOT IN等价于<>...