declare @id int
declare @name nvarchar(100)
declare My_Cursor cursor for
select id,name from department
open My_Cursor
fetch next from My_Cursor into @id,@name
while @@FETCH_STATUS=0
begin
--代码
--代码
fetch next from My_Cursor into @id,@name
end
close My_Cursor
deallocate My_Cursor
游标
最新推荐文章于 2024-11-17 23:07:03 发布