create table #promprod (sevencode nvarchar(20)) insert into #promprod values ('0063173') insert into #promprod values ('0057584') insert into #promprod values ('0058495') insert into #promprod values ('0058510') insert into #promprod values ('0076541') insert into #promprod values ('0...
INTO @au_lname, @au_fname END CLOSE authors_cursor DEALLOCATE authors_cursor GO Author: Abraham Bennet Author: Reginald Blotchet-Halls C. 声明SCROLL 游标并使用其它FETCH 选项 下例创建一个SCROLL 游标,使其通过LAST、PRIOR、RELATIVE 和ABSOLUTE 选项支持所有滚动能力。 GO -- Execute the SELECT stateme...
语法 FETCH [[NEXT|PRIOR|FIRST|LAST |ABSOLUTE{n|@nvar} |RELATIVE{n|@nvar} ] FROM ] {{[GLOBAL]cursor_name}|@cursor_variable_name} [INTO@variable_name[,...n]] 参数 NEXT 返回紧跟当前行之后的结果行,并且当前行递增为结...
(80) declare curProc cursor for select name from sysobjects where xtype=p and name like JAVA_% open curProc fetch next from curProc into @name while @@fetch_status=0 begin print exec sp_helptext +@name exec(exec sp_helptext +@name) fetch next from curProc into @name end close cur...