一条SQL生成九九乘法表
导读:
with t as (select level as n from dual connect by level <=9)
select sys_connect_by_path(b.n || '*' || a.n || '=' || a.n * b.n, ' ') as 九九乘法表
from t a, t b
where a.n >= b.n and level = a.n
start with b.n=1
connect by a.n=prior a.n and b.n=prior b.n+1;
本文转自
http://woodnan.itpub.net/post/37055/457860
with t as (select level as n from dual connect by level <=9)
select sys_connect_by_path(b.n || '*' || a.n || '=' || a.n * b.n, ' ') as 九九乘法表
from t a, t b
where a.n >= b.n and level = a.n
start with b.n=1
connect by a.n=prior a.n and b.n=prior b.n+1;
本文转自
http://woodnan.itpub.net/post/37055/457860