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
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END