RTCursor这个东西在SQL2005的企业管理器里到哪去找?

解决方案 »

  1.   

    游标的名字就是RTCursor
    declare RTCursor cursor  for
    ....
      

  2.   

    --fetch next from RTCursorDECLARE RTCursor CURSOR FOR SELECT o.name FROM sysobjects AS o
    DECLARE @sstr VARCHAR(30)OPEN RTCursorFETCH NEXT FROM RTCursor INTO @sstr
    SELECT @sstrCLOSE RTCursor
    DEALLOCATE RTCursor
      

  3.   

    Cursor_name
    看看游标这章的基本语法
      

  4.   

    --看示例:
    --1.创建存储过程
    ALTER PROCEDURE [dbo].[SMS_RTNextRecord]
    -- Add the parameters for the stored procedure here
    ASfetch next from RTCursor--2.调用存储过程
    DECLARE RTCursor CURSOR FOR
    SELECT [Field] FROM test
    OPEN RTCursor 
    exec SMS_RTNextRecordCLOSE RTCursor 
    DEALLOCATE RTCursor 
      

  5.   

    ALTER PROCEDURE [dbo].[SMS_RTNextRecord]
    -- Add the parameters for the stored procedure here
    ASfetch next from RTCursor代码到这里就没了啊,没看见定义的语句啊