mysql就比如
1列 2列
A B
转换成
1列 A
2列 B
select '1列' as aa,1列 as bb from 表名
union all
select '2列' as aa,2列 as bb from 表名
Mysql查询:行转列与列转行_mysql 列转行-CSDN博客
mysql行转列函数_mob649e8162842c的技术博客_51CTO博客
https://blog.csdn.net/qq_47776903/article/details/121379395