sql游标使用,sql 游标使用笔记

复制代码 代码如下:
declare @pdtid nvarchar(50)
declare @ptype nvarchar(50)
declare my_cursor CURSOR for
select pdtid,ptype from dbo.Product
open my_cursor
fetch next from my_cursor
into @pdtid,@ptype
while @@fetch_status=0
begin
fetch next from my_cursor
end
close my_cursor
Tags:  什么是sql游标 sql游标 sql游标使用

延伸阅读

最新评论

发表评论