sql游标笔记

declare@pdtidnvarchar(50)
declare@ptypenvarchar(50)

declare my_cursor CURSORfor
select pdtid,ptype from dbo.Product
open my_cursor
fetchnextfrom my_cursor
into@pdtid,@ptype
while@@fetch_status=0
begin
fetchnextfrom my_cursor
end
close my_cursor
原文地址:https://www.cnblogs.com/muyoushui/p/2013582.html