select id,
max(case when 唯一值列名=值 then 需要转的列数据 end) as '重定义名字',
max(case when 唯一值列名=值 then 需要转的列数据 end ) as '重定义名字'
from 表名 group by id order by id;

posted on 2017-05-17 12:13  PaperFolding  阅读(149)  评论(0编辑  收藏  举报