-- 사이트내에 행/열, 열/행 전환 글이 많이 있을 건데요 다른 글도 참고해보세요~ SELECT no, DECODE(no, 1, r1, 2, r2, 3, r3) r, DECODE(no, 1, w1, 2, w2, 3, w3) w FROM (SELECT 20 r1, 30 w1, 0 r2, 15 w2, 7 r3, 9 w3 FROM DUAL) t, (SELECT LEVEL no FROM DUAL CONNECT BY LEVEL <= 3) ct; SELECT ROWNUM no, r, w FROM (SELECT 20 r1, 30 w1, 0 r2, 15 w2, 7 r3, 9 w3 FROM DUAL) t UNPIVOT ((r,w) FOR c IN ((r1,w1),(r2,w2),(r3,w3)));