update sc set score=score*1.05
where score<(select avg(score) from sc) and sno in (select sno from students where ssex='女');
SQLServer中可以支持这种写法,但是mySql不行的,不能直接把select出的结果集作为条件。
修改为:
update sc set score=score*1.05
where score<(select score from(select avg(score)score from sc)a)
and sno in (select sno from (select sno from students where ssex='女')b);
若有帮助,请采纳~