declare ID_cursor cursor for
select * from 表名
open ID_cursor
/*while @@fetch_status=0*/
begin
update 表名 set 字段名='值'
end
close ID_cursor
deallocate ID_cursor
转载于:https://www.cnblogs.com/xhui/archive/2006/03/14/349681.html