日期:2014-05-17 浏览次数:20758 次
select ID,N1 as N,v1 as V from A union all select ID,N2,v2 from A union all select ID,N3,v3 from A
------解决方案--------------------
我觉得在你知道你的表有多少个Nx和Vx的情况下,你可以使用土的方法union 起来
select id,n1 as n ,v1 as v from tb_name
union all
select id,n2 as n ,v2 as v from tb_name
...
....