靈活SQL語句

一、查詢數學成績排名 select stid, name, score, (select count(*) from stuscore s where s.subject='數學' and s.score > score)+1  from stuscore where subject='數學' order by score 靈活點:用一個子查詢查詢出比當前人成績大的有多少人,那麼有多少人就是第幾名
相關文章
相關標籤/搜索