구구단.txt
select
decode(substr(구구단,1,1),1,구구단) "1단",
decode(substr(구구단,1,1),2,구구단) "2단",
decode(substr(구구단,1,1),3,구구단) "3단",
decode(substr(구구단,1,1),4,구구단) "4단",
decode(substr(구구단,1,1),5,구구단) "5단",
decode(substr(구구단,1,1),6,구구단) "6단",
decode(substr(구구단,1,1),7,구구단) "7단",
decode(substr(구구단,1,1),8,구구단) "8단",
decode(substr(구구단,1,1),9,구구단) "9단"
from(
select n||'x'||m||'='||n*m 구구단
from(
select level n
from dual
connect by level<=9
) ,
(
select level m
from dual
connect by level<=9
)
)
;