I can do that too, in Firebird.
You had me going there for a moment Norm.
I initially thought: there’s some client that can reference an Oracle database called Firefox which can create a stored procedure like the one outlined that will actually compile?
Then I googled Firefox and found it is a relational database itself
If you had attempted to compile the procedure through SQLPlus, you would have run into the same error. Delete, Insert and Update SQL statements can be done in a PLSQL block without any additional variables. However, as another has already said, a select statement must return the value into a local variable of some type for use in the PLSQL block (the stored procedure).
Additionally, if you modify your procedure call to be:
CREATE OR REPLACE PROCEDURE
instead of just
you’ll be able to avoid the compile error that tells you the object already exists.
This communication, including any attached documentation, is intended only for the person or entity to which it is addressed, and may contain confidential, personal and/or privileged information. Any unauthorized disclosure, copying, or taking action on the contents is strictly prohibited. If you have received this message in error, please contact us immediately so we may correct our records. Please then delete or destroy the original transmission and any subsequent reply.