Convert columns into rows
717321Aug 6 2010 — edited Aug 6 2010Dear experts,
Please help me on how to convert columns into rows.
Like :- select cno, p1,p2,p3,p4,p5 from abc
out put is cno p1 p2 p3 p4 p5
1 100 200 300 400 500
2 10 20 30 40 50
3 1000 2000 3000 4000 5000
expected result
cno 1 2 3
p1 100 10 1000
p2 200 20 2000
p3 300 30 3000
p4 400 40 4000
p5 500 50 5000
Please help me.
Thanks in advance