Search code examples
oracle-databaseplsqloracle10gora-00900

How to execute an oracle stored procedure?


I am using oracle 10g express edition. It has a nice ui for db developers. But i am facing some problems executing stored procedures.

Procedure:

create or replace procedure temp_proc is
begin
  DBMS_OUTPUT.PUT_LINE('Test');
end

it is created successfully. But when i execute:

execute temp_proc;

it shows ORA-00900: invalid SQL statement

So help needed here


Solution

  • Execute is sql*plus syntax .. try wrapping your call in begin .. end like this:

    begin 
        temp_proc;
    end;
    

    (Although Jeffrey says this doesn't work in APEX .. but you're trying to get this to run in SQLDeveloper .. try the 'Run' menu there.)