declare @id int
   set @id=0
   declare cur_Esaleagent scroll cursor for
   select * from ItemMatch
   open cur_Esaleagent
   fetch first from cur_Esaleagent
  
  
    while @@FETCH_STATUS = 0
     begin
   set @id=@id+1
   update ItemMatch set id=@id
   fetch next from cur_Esaleagent
       --set @id=@id+1
       end
    close cur_Esaleagent
 deallocate cur_Esaleagent
沒有留言:
張貼留言