2011년 6월 2일 목요일

메뉴 생성 Query(위쪽) - 2


SELECT level,
       a.id,
       a.ref,
       a.menu_name,
       a.param,
       a.url,
       a.chk_cmd,
       a.sort_order,
       folder_sect,
       roll_over_on_img,
       roll_over_off_img
FROM   (SELECT b.id,
               b.ref,
               b.url,
               b.param,
               b.menu_name,
               b.sort_order,
               b.folder_sect,
               b.chk_cmd,
               b.roll_over_on_img,
               b.roll_over_off_img
        FROM   메뉴권한매핑 a,
               메뉴 b
        WHERE  a.menu_seq = b.seq
        AND    b.use_yn = 'Y'
        AND    a.type_seq = 14) a
WHERE  1 = 1 CONNECT BY PRIOR a.id = a.ref START WITH a.ref = 10
ORDER siblings BY a.sort_order;

댓글 없음:

댓글 쓰기