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 閱讀(95) 評論(0)  編輯  收藏

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


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 临城县| 曲周县| 深水埗区| 石屏县| 鲁甸县| 阳山县| 吉安市| 汉源县| 嘉定区| 邵东县| 澜沧| 依安县| 磐安县| 应城市| 北碚区| 罗山县| 屏山县| 铜川市| 寻甸| 赤城县| 伊吾县| 色达县| 济源市| 闸北区| 涿州市| 云龙县| 沂水县| 邢台市| 中江县| 如皋市| 礼泉县| 盘山县| 肃北| 磐石市| 南丹县| 城市| 汤原县| 上林县| 府谷县| 盐山县| 鄂托克旗|