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)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 疏附县| 谢通门县| 玉树县| 柘荣县| 江都市| 自治县| 花莲市| 南投市| 安泽县| 三原县| 新化县| 娱乐| 阿坝县| 威宁| 湘潭县| 乡城县| 平安县| 牟定县| 宜宾县| 饶平县| 宿迁市| 铜鼓县| 双城市| 上虞市| 牙克石市| 武陟县| 鸡东县| 宁明县| 喀什市| 长宁区| 灵丘县| 勐海县| 启东市| 乡城县| 怀来县| 宁海县| 汉源县| 噶尔县| 盐池县| 江都市| 新昌县|