Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

pivô simples de colunas para linhas no MySql

select 'A' as title1, a as title2 from table union all
select 'B' as title1, b as title2 from table union all
select 'C' as title1, c as title2 from table union all
select 'D' as title1, d as title2 from table