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)  編輯  收藏

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


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 贡嘎县| 龙南县| 阜城县| 崇文区| 精河县| 东平县| 华容县| 汤阴县| 江达县| 阿拉善左旗| 康马县| 浮山县| 义乌市| 抚顺县| 马龙县| 体育| 旌德县| 随州市| 京山县| 九寨沟县| 临汾市| 喀什市| 集贤县| 洮南市| 将乐县| 杨浦区| 大石桥市| 巴林左旗| 南丰县| 浮山县| 遵义市| 南安市| 朝阳区| 衡南县| 景德镇市| 福泉市| 海安县| 华坪县| 顺平县| 泾阳县| 沙田区|