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
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
-------------------------------------------------
!!!作者:木由水 http://www.cnblogs.com/muyoushui