declare @a varchar(100),@b varchar(100) declare user_cursor cursor for select a,b from tableA tab open user_cursor fetch next from user_cursor into @a,@b while @@fetch_status=0 begin update tableA set [email protected] where b=@b fetch next from user_cursor into @a,@b end CLOSE user_cursor DEALLOCATE user_cursor
时间: 2024-07-29 07:07:45