mysql 实现行转列和列转行

select * from mysql.sit.t_pivot;

select max(case when name='a' then value end) as aa, max(case when name='b' then value end) as bb, max(case when name='c' then value end) as cc from mysql.sit.t_pivot;

 

posted @ 2022-07-13 15:42  zjb480  阅读(176)  评论(0)    收藏  举报