oracle 怎么把值设置成列名
原表id|name|subject|score----------------------------------1|zhangs|chinese|801|zhangs|...
原表
id | name | subject | score
----------------------------------
1 | zhangs | chinese | 80
1 | zhangs | math | 80
1 | zhangs | english | 80
2 | lisi | chinese | 90
2 | lisi | math | 90
2 | lisi | english | 90
3 | wangw | chinese | 70
3 | wangw | math | 70
3 | wangw | english | 70
效果
id | name | chinese | math | english
-----------------------------------------
1 | zhangs | 80 | 80 | 80
2 | lisi | 90 | 90 | 90
3 | wangw | 70 | 70 | 70
哪位高手指定下 展开
id | name | subject | score
----------------------------------
1 | zhangs | chinese | 80
1 | zhangs | math | 80
1 | zhangs | english | 80
2 | lisi | chinese | 90
2 | lisi | math | 90
2 | lisi | english | 90
3 | wangw | chinese | 70
3 | wangw | math | 70
3 | wangw | english | 70
效果
id | name | chinese | math | english
-----------------------------------------
1 | zhangs | 80 | 80 | 80
2 | lisi | 90 | 90 | 90
3 | wangw | 70 | 70 | 70
哪位高手指定下 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询