How to exit a PLSQL program
Looking for a way to exit a PLSQL program before reaching the end. Probable use would be to trap some sort of condition, output a message and then "exit". The "exit" command provided seems to have been designed to "break" out of loops. Failing to find anything that looks like exit in the index of my "Oracle PL/SQL Programming" manual (looked for "exit", "quit", "finish", "stop", "bye" etc...) I decided to write this note.
I also tried to "goto" a label which was at the end of the PLSQL program. It failed with unspecified compilation errors. A test program also failed...
create or replace procedure try as
x number;
begin
goto over;
dbms_output.put_line('Hi There');
<<over>>
end try;
/
Q: How does one exit a PLSQL?
Q: Why doesn't the little try program above not compile?