declare @Storage int, @EdsProd intdeclare My_cursor cursor scroll for select distinct Storage,EdsProd from InmInventory open My_cursor fetch next from My_cursor into @Storage,@EdsProd while(@@fetch_status=0) begin select @Storage as '仓库',@EdsProd as '产品' fetch next from My_cursor into @Storage,@EdsProd end close My_cursor--关闭游标 deallocate My_cursor --释放游标
所有评论(0)