Chinaunix首页 | 论坛 | 博客
  • 博客访问: 530207
  • 博文数量: 134
  • 博客积分: 7990
  • 博客等级: 少将
  • 技术积分: 1290
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-29 11:43
文章分类

全部博文(134)

文章存档

2009年(7)

2008年(80)

2007年(47)

我的朋友

分类: Oracle

2008-07-18 08:30:32

啥也不说了,自己去把下面的代码执行一下就知道了:
 

with a as ( select distinct round(sum(x) over(order by n)) x, round(sum(y) over(order by n)) y from
(select n, cos(trunc(n / 20) * (1-1/5) * 3.1415926) * 2 x, sin(trunc(n / 20) * (1-1/5) * 3.1415926) y
from (select rownum - 1 n from all_objects where rownum <= 20 * 5))) select replace(sys_connect_by_path(point, '/'), '/', null) star
from (select b.y, b.x, decode(a.x, null, ' ', '*') point from a, (select * from (select rownum - 1 + (select min(x) from a) x from all_objects
 where rownum <= (select max(x) - min(x) + 1 from a)),
 (select rownum - 1 + (select min(y) from a) y from all_objects where rownum <= (select max(y) - min(y) + 1 from a))) b
  where a.x(+) = b.x and a.y(+) = b.y) where x = (select max(x) from a) start with x = (select min(x) from a) connect by y = prior y
   and x = prior x + 1;

阅读(1056) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~