id type name c1 c2 c3 c4 c5
1 2 3 0.1 0.2 0.3 0.4 0.5
2 3 4 0.3 0.4 0.9 0.8 0.6
表结构如此,需要显示为内容
id type name c_n
1 2 3 0.1
1 2 3 0.2
......
你可以这样
select id,type,name,c1 as c_n union看看行不
嗯,union是可以的。但是这个会很麻烦,我的列会有很多。最好是批量转的。
追答这好像你就得自己写程序操作了,SQL好像没有更好的方法了吧
追问mysql貌似是没有,但是我必须要mysql来搞,真是纠结啊。