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

Thread: pl/sql procedure exiting

  1. #1
    Join Date
    Oct 2000
    Posts
    10
    I have a pl/sql procedure for oracle 8.1.6 and I have multiple if..then statements.

    I want to be able to leave the procedure (i.e. exit) after a certain condition is met... I do not want to have to write in all the conditions into each if..then statement. Especially since I am working with cursors.. it could get ugly.

    If anyone knows how to get out .. please let me know.

    Nick

  2. #2
    Join Date
    Jul 2000
    Posts
    296
    It's not possible to use IF THEN ELSIF?

    You can use RETURN to leave the procedure:

    IF condition1
    THEN statement1; return;
    END IF;
    IF condition2
    THEN statement2; return;
    END IF;


  3. #3
    Join Date
    Oct 2000
    Posts
    10
    very cool! thanks!

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