会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
lhw0609
博客园
首页
新随笔
联系
管理
订阅
2013年3月22日
把多条成绩单(不同学科,同一个人),合并成一条记录 用case when group by
摘要: 例子:SELECT name,SUM(CASE when `subject`='语文' then fenshu end) as '语文',SUM(CASE when `subject`='数学' then fenshu end) as '数学' ,SUM(CASE when `subject`='英语' then fenshu end) as '英语' from chengji GROUP BY name
阅读全文
posted @ 2013-03-22 13:16 lhw0609
阅读(569)
评论(0)
推荐(0)
编辑
公告