declare @A datetime    
          declare @ID varchar(12) 
          declare mycursor cursor for select pubdate,title_ID from titles  
          open mycursor                 
          fetch next from mycursor  into @A,@ID             
          while(@@fetch_status=0)   
          begin
          update titles set pubdate=dateadd(day,round(rand()*120,0),@A) where title_ID=@ID
            fetch next from mycursor into @A ,@ID    

          end        
          close mycursor                                               
          deallocate mycursor 

          posted on 2009-07-13 14:44 sanmao 閱讀(98) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 合阳县| 东城区| 蚌埠市| 调兵山市| 罗江县| 廉江市| 拜泉县| 贡嘎县| 林甸县| 阳江市| 吉首市| 大姚县| 上饶县| 会东县| 汉中市| 逊克县| 九江县| 桓台县| 道孚县| 海南省| 北碚区| 开封市| 新干县| 涟水县| 伊金霍洛旗| 沁水县| 苍南县| 仁布县| 德庆县| 台安县| 怀安县| 马山县| 凤城市| 天全县| 杨浦区| 贵港市| 潼关县| 阳高县| 平原县| 天等县| 庄浪县|