当前位置: 代码迷 >> Oracle管理 >> 新人求这SQL面试题答案,该怎么处理
  详细解决方案

新人求这SQL面试题答案,该怎么处理

热度:41   发布时间:2016-04-24 04:36:42.0
新人求这SQL面试题答案


前三个都比较简单
但第四个问题,怎样转变表的格式啊,哪位大哥帮忙做一下

------解决方案--------------------
select name as "姓名",
(select result from CJ where name=t.name and subject='语文') as "语文",
(select result from CJ where name=t.name and subject='数学') as "数学",
(select result from CJ where name=t.name and subject='英语') as "英语",
from CJ t
group by name
  相关解决方案