<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Decode360's Blog

    業精于勤而荒于嬉 QQ:150355677 MSN:decode360@hotmail.com

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 ::  :: 管理 ::
      397 隨筆 :: 33 文章 :: 29 評論 :: 0 Trackbacks
    打印五環和五角星的SQL代碼
    ?
    ?
    ??? 大牛寫的這兩段SQL實在是太銷魂了,實在是忍不住要轉載過來,留著以后慢慢看,太牛了……
    ??? http://www.itpub.net/viewthread.php?tid=981654&extra=&page=1
    ?
    ?
    ?
    with a as (select distinct round(a.x + b.x) x,round(a.y + b.y) y from
    (select (sum(x) over(order by n)) x,
    ??????????????????????????? round(sum(y) over(order by n)) y
    ????????????? from (select n, cos(n/30 * 3.1415926)*2? x,
    ?????????????????????????? sin(n/30 * 3.1415926) y
    ?????????????????????????? from (select rownum - 1 n from all_objects where rownum <= 30 +30))) a,
    ??????????? (select n, (sum(x) over(order by n)) x,
    ??????????????????????????? round(sum(y) over(order by n)) y
    ????????????? from (select n,
    ?????????????????????????? cos( m /3 * 3.1415926) * 2 * 15 x,
    ?????????????????????????? sin( m /3 * 3.1415926)* 15 y
    ????????????????????? from (select case when rownum <= 2 then 3
    ????????????????????? when rownum = 3 then -2 else -6 end m, rownum - 1 n
    ????????????????????????????? from all_objects where rownum <= 5))) b
    ????????? )
    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;
    ?
    ?

    ????????????? * * * * * *?????????????????? * * * * * *?????????????????? * * * * * *?????????????
    ????????? * *???????????? * *?????????? * *???????????? * *?????????? * *???????????? * *?????????
    ?????? * *?????????????????? * *???? * *?????????????????? * *???? * *?????????????????? * *??????
    ???? *?????????????????????????? * *?????????????????????????? * *?????????????????????????? *????
    ?? **??????????????????????????? ***?????????????????????????? ***??????????????????????????? **??
    ? *???????????????????????????? *?? *???????????????????????? *?? *???????????????????????????? *?
    *???????????????????????????? *???? *?????????????????????? *???? *???????????????????????????? *
    *???????????????????????????? *???? *?????????????????????? *???? *???????????????????????????? *
    *???????????????????????????? *?????? *???????????????????? *?????? *???????????????????????????? *
    *???????????????????????????? *?????? *???????????????????? *?????? *???????????????????????????? *
    *???????????????????????????? *?????? *???????????????????? *?????? *???????????????????????????? *
    *???????????????????????????? *?????? *???????????????????? *?????? *???????????????????????????? *
    *???????????????????????????? *???? *?????????????????????? *???? *???????????????????????????? *
    *?????????????????????????? * * * * * *?????????????????? * * * * * *?????????????????????????? *
    ? *????????????????????? * *??? *?? *??? * *?????????? * *??? *?? *??? * *????????????????????? *?
    ?? *????????????????? * *??????? * *??????? * *???? * *??????? * *??????? * *????????????????? *??
    ??? **????????????? *??????????? ***??????????? * *??????????? ***??????????? *????????????? **???
    ?????? *????????? **?????????? *???? *????????? ***????????? *???? *?????????? **????????? *??????
    ???????? ** *??? *??????? * **???????? ** *??? *?? *??? * **???????? ** *??????? *??? * **????????
    ????????????? * * * * * *?????????????????? * * * * * *?????????????????? * * * * * *?????????????
    ??????????????? *???????????????????????????? *???? *???????????????????????????? *???????????????
    ?????????????? *???????????????????????????? *?????? *???????????????????????????? *??????????????
    ?????????????? *???????????????????????????? *?????? *???????????????????????????? *??????????????
    ?????????????? *???????????????????????????? *?????? *???????????????????????????? *??????????????
    ?????????????? *???????????????????????????? *?????? *???????????????????????????? *??????????????
    ??????????????? *???????????????????????????? *???? *???????????????????????????? *???????????????
    ??????????????? *???????????????????????????? *???? *???????????????????????????? *???????????????
    ???????????????? *???????????????????????????? *?? *???????????????????????????? *????????????????
    ????????????????? *???????????????????????????? * *???????????????????????????? *?????????????????
    ?????????????????? **?????????????????????????? ***?????????????????????????? **??????????????????
    ????????????????????? *?????????????????????? *???? *?????????????????????? *?????????????????????
    ??????????????????????? ** *???????????? * **???????? ** *???????????? * **???????????????????????
    ???????????????????????????? * * * * * *?????????????????? * * * * * *????????????????????????????
    ?
    ?
    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;



    ??????????????????? *???????????????????
    ?????????????????? * *??????????????????
    ?????????????????? * *??????????????????
    ????????????????? *?? *?????????????????
    ???????????????? **?? **????????????????
    ??????????????? *?????? *???????????????
    ??????????????? *?????? *???????????????
    * * * * * * * *** * * * *** * * * * * * *
    ? **????????? *?????????? *????????? **?
    ???? **?????? *?????????? *?????? **????
    ??????? *??? *???????????? *??? *???????
    ????????? ** *???????????? * **?????????
    ??????????? ** *???????? * **???????????
    ?????????? *??? * *?? * *??? *??????????
    ?????????? *?????? * *?????? *??????????
    ????????? *????? * * * *????? *?????????
    ???????? *??? * *?????? * *??? *????????
    ???????? *? *?????????????? *? *????????
    ??????? ** *???????????????? * **???????
    ??????? *?????????????????????? *???????
    ?
    ?
    ?
    ?
    posted on 2008-11-01 19:47 decode360 閱讀(411) 評論(0)  編輯  收藏 所屬分類: 05.SQL
    主站蜘蛛池模板: 国产亚洲精品2021自在线| 亚洲欧洲无码一区二区三区| 深夜福利在线视频免费| 天天看片天天爽_免费播放| 亚洲日本乱码卡2卡3卡新区| 99国产精品永久免费视频| 亚洲国产成人久久综合一区| 国产成人精品久久免费动漫| 亚洲成人黄色在线观看| 91免费资源网站入口| 亚洲 日韩 色 图网站| 毛片免费视频观看| 亚洲精华液一二三产区| 可以免费观看的一级毛片| 人妻无码中文字幕免费视频蜜桃| 国产精品另类激情久久久免费 | 亚洲成人高清在线观看| 84pao国产成视频免费播放| 亚洲视频在线观看网站| 日韩免费a级毛片无码a∨| 日韩在线视精品在亚洲| 亚洲精品在线视频| 无码一区二区三区免费| 亚洲一级毛片免观看| 免费日本黄色网址| 黄桃AV无码免费一区二区三区| 亚洲产国偷V产偷V自拍色戒| 13一14周岁毛片免费| 亚洲AV无码成人精品区狼人影院| 亚洲美女在线国产| 免费看男人j放进女人j免费看| 亚洲成年人免费网站| 国产成人免费全部网站| 中国内地毛片免费高清| 亚洲精品美女久久久久9999| 青草草在线视频永久免费| 一区二区在线视频免费观看| 综合自拍亚洲综合图不卡区| 国产色爽免费视频| 日韩免费在线观看视频| 亚洲乱亚洲乱妇24p|