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 --释放游标

 

转载于:https://www.cnblogs.com/lightpro/p/10517567.html

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐