DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: SQL%isopen

  1. #1
    Join Date
    Nov 2000
    Posts
    416

    Question

    Consider this PL/SQL block :


    DECLARE
    v_result BOOLEAN;
    BEGIN
    DELETE
    FROM product
    WHERE product_id IN (25, 35, 45);
    v_result := SQL%ISOPEN;
    COMMIT;
    END;

    What would be the value of v_result if let's say three rows detected?

    TRUE, FALSE, NULL, Zero or ... ?


    Thanks






  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Since a DELETE statement opens an implicit cursor, the value would be FALSE. An implicit cursor opens a cursor when the statement starts and closes the cursor when the statement ends. By the time you get to assign SQL%ISOPEN to v_result, it will already be closed.
    Jeff Hunter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width