SQL语句-表转置
时间:2010-08-19 来源:程序帝
SQL语句:
select Name,
sum(case when Subject='语文' then Result end)as '语文',
sum(case when Subject='数学' then Result end)as '数学',
sum(case when Subject='物理' then Result end)as '物理'
from Student
group by Name
相关阅读 更多 +