sql >> Base de Datos >  >> RDS >> Mysql

pivote simple de columnas a filas en 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