with t as ( select 1 no from dual union all select 2 no from dual union all --select 4 no from dual union all --select 5 no from dual union all --select 6 no from dual union all --select 7 no from dual union all select 3 no from dual ) select a.no from (select no, rownum rn from t) a full outer join (select level lv from dual connect by level <=5) b on (a.rn = b.lv)
꼭 쿼리로 해야되는 게 아니면 프론트단에서 처리하는 게 어떠실지?
-- 아 MySQL이네요; 오라클 connect by level을 활용한 행복제 대신 행복제용 temp 테이블을 만드시든 recursive 쿼리 사용하시면 될 것 같습니다.