摘要: 方法1:select name,sum(case subject when'数学' then source else 0 end ) as '数学',sum(case subject when'英语' then source else 0 end ) as '英语',sum(case subject when'语文' then source else 0 end ) as '语文'from testgroup by name方法2:declare @sql varchar(8000)set @sql 阅读全文
posted @ 2014-03-06 17:51 蜗牛超悍马 阅读(160) 评论(0) 推荐(0) 编辑