WITH t AS ( SELECT 'A' cd, 'A1' v FROM dual UNION ALL SELECT 'A', 'A2' FROM dual UNION ALL SELECT 'A', 'A3' FROM dual UNION ALL SELECT 'A', 'A4' FROM dual UNION ALL SELECT 'B', 'B1' FROM dual UNION ALL SELECT 'B', 'B2' FROM dual UNION ALL SELECT 'B', 'B3' FROM dual UNION ALL SELECT 'B', 'B4' FROM dual ) SELECT a.v a , b.v b FROM t a , t b WHERE a.cd = 'A' AND b.cd = 'B' ORDER BY a, b ;
정말 감사드립니다..^^