一条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
posted @ 2008-03-24 11:02  爱生活,爱编程  阅读(213)  评论(0编辑  收藏  举报