M
motorola168
Unregistered / Unconfirmed
GUEST, unregistred user!
数据库用的mysal 现在求一SQL语句统计单科排名<br>每个科目成绩排名<br>表结构如下<br>学号.科目 分数 <br><br><br>需要优化<br>update score_score a set a.`njpm` =<br>(select count(*)+1 from<br>(select `Course_Name`,`Score` from score_score <br> where `Test_No` = '2007112') as c<br> where c.Score > a.`Score`<br> and c.Course_Name = a.`Course_Name`)<br> where a.Test_No = '2007112'