






















1. sql 脚本编写 行转列 列转行
表设计
test_table
id varchar(11),
name varchar(255),
table_desc varchar(255)
sql 编写
行转列
select concatenate("id",""),
concatenate("name",""),
concatenate("desc",""),
concatenate(
""
,(
select *
from test_table a
where 1=1
limit 1
desc
)
)
from test_table b
列转行
select concatenate("id",""),*
from test_table a
union
(
select b.id
from test_table b
limit 1
desc
)
;
posted on 2026-04-10 08:00 CoderOilStation 阅读(3) 评论(0) 收藏 举报
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。