<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
    主站蜘蛛池模板: 一二三四免费观看在线电影| 巨胸喷奶水www永久免费| 久久久久久久久久国产精品免费| 亚洲精品WWW久久久久久| 国产一区二区三区亚洲综合 | 最好看最新的中文字幕免费| 亚洲日本va在线视频观看| 手机永久免费的AV在线电影网| 免费h成人黄漫画嘿咻破解版| 理论秋霞在线看免费| 亚洲精品在线视频| A级毛片成人网站免费看| 亚洲中文字幕在线第六区| 精品成人免费自拍视频| 亚洲最大福利视频网站| 国产片AV片永久免费观看 | 国产无遮挡吃胸膜奶免费看视频| 亚洲av永久无码| 亚洲va中文字幕无码| 国产精品hd免费观看| 久久久无码精品亚洲日韩蜜桃| 少妇太爽了在线观看免费视频| 亚洲同性男gay网站在线观看| 成人毛片免费视频| 国产在线观看片a免费观看| 日本亚洲色大成网站www久久| 免费a级毛片在线观看| 国产日韩一区二区三免费高清| 成人无遮挡毛片免费看| 美国免费高清一级毛片| 亚洲人成伊人成综合网久久久| 91精品国产免费| MM1313亚洲精品无码久久| 自拍偷自拍亚洲精品情侣| 99久久久国产精品免费牛牛四川 | 亚洲国产一区二区视频网站| 久久久久成人精品免费播放动漫| 18禁黄网站禁片免费观看不卡| WWW亚洲色大成网络.COM| 久久久久亚洲精品美女| 日本免费网站观看|