sql 样例
select
t_students.name as '姓名',
sum(case when b.cname='语文' then c.sc_val else 0 end) As '语文' ,
sum(case when b.cname='数学' then c.sc_val else 0 end) As '数学',
sum(case when b.cname='英语' then c.sc_val else 0 end) As '英语',
From t_students a, t_corses b, t_scores c
where a.sid=c.sid and c.cid=b.cid
group by t_students.name