cate_cd |
cate_name |
cate_level |
cate2_cd |
cate3_cd |
cate_order |
100 |
컴퓨터 |
1 |
0 |
0 |
1 |
102 |
노트북 |
2 |
100 |
0 |
1 |
103 |
넷북 |
2 |
100 |
0 |
2 |
104 |
삼성 |
3 |
100 |
102 |
1 |
101 |
핸드폰 |
1 |
0 |
0 |
2 |
105 |
아이폰 |
2 |
101 |
0 |
1 |
with t as ( select '컴퓨터' cate_name, 1 cate_level from dual union all select '노트북', 2 from dual union all select '넷북', 2 from dual union all select '삼성', 3 from dual union all select '핸드폰', 1 from dual union all select '아이폰', 2 from dual ) select cate_name , cate_level , lpad(' ', (cate_level-1)*10, ' ')||cate_name from t m ;