select * from exam_result where math > 80 or select * from exam_result order by chinese desc limit 3;这个该怎么改呢
select * from exam_result where math > 80
union all
select * from exam_result order by chinese desc limit 3;
问题需要描述清楚吧,你的语句目的是什么? 两个select语句为什么要用or连接,为什么不直接写两个查询语句?
select * from exam_result where math > 80 or id in (select id from exam_result order by chinese desc limit 3)