如题:
    不知道什么 原因我用 SYS_REFCURSOR定义的游标不能进行close和OPEN。
     而用CURSOR是可以的。

解决方案 »

  1.   

    在使用时无需open可以close,定义时需指定open词。
    具体代码呢?
      

  2.   

    具体的代码非常长。是这样的。我所定义的游标是需要进行两次循环的。
    第一次循环结束后还要重头循环一次。所以要用open打开。
      

  3.   

    SYS_REFCURSOR 和 CURSOR 的有什么区别呢?
      

  4.   

    No difference. Big difference.Depends on from where you look at the thing called a "cursor".Inside Oracle itself (the SQL Shared Pool) - no difference at all. Every single SQL parsed becomes a cursor. Oracle's SQL engine has no concept of ref cursor, or any other type of cursor. These are all just cursors. Period.From the client language (PL/SQL, Java, C#, etc) there are differences. They implement "interfaces" to that cursor in the SQL engine.PL/SQL specifically provides a couple of such interfaces:
    - an implicit cursor (you simply code SQL directly in PL, and it does the cursor "thing" for you)
    - an explicit cursor (you code the cursor definition, and the fetches from the cursor)
    - a DBMS_SQL cursor (the full SQL cursor interface - complex, but with a lot of additional goodies)
    - a reference cursor (a reference/handle/pointer to a cursor that is intended to be passed to an external client for use)Please refer:
    http://forums.oracle.com/forums/thread.jspa?threadID=329109