sql查询,帮忙解决下
本帖最后由 如果弯弯 于 2012-6-29 13:21 编辑a) update score set sc_sco=sc_sco+10 where sc_no='345';
b) select a.st_no,a.st_name from STUDENT a,score b
where a.st_no = b.sc_stno and b.sc_no='123' and b.sc_sco>80;
c)select a.st_no,a.st_name ,a.st_age,b.sumsco
from STUDENT a,(select sc_stno ,sum(sc_sco) as sumscore from score group by sc_stno) b
where a.st_no=b.sc_stno; 回复 1# fish1689999
a)update score set sc_sco=sc_sco+10 where sc_no=345
b)select t1.st_no,t1.st_name from student t1,score t2 where t1.st_no=t2.sc_stno
and t2.sc_no=123
and t2.sc_sco>80 a)update score set sc_sco=sc_sco+10 where sc_no=345
c)select t1.st_no,t1.st_name,sum(t2.sc_sco)from student t1,score t2 where t1.st_no=t2.sc_nogroup by t2.sc_no ; 不错不错
页:
[1]