I am new at this. I am trying to just run a procedure.
My procedure is this:
create or replace procedure temp_proc is
begin
DBMS_OUTPUT.PUT_LINE('Test');
end
this executes fine:
but when I try to call it using this:
begin
temp_proc;
end;
It shows temp_proc is invalid.
How do you call a procedure in oracle pl/sql please help
CodePudding user response:
Procedure's code misses semi-colon after end
; if you ran it in SQL*Plus, it misses a slash as well. Other than that, it works:
SQL> create or replace procedure temp_proc is
2
3 begin
4 DBMS_OUTPUT.PUT_LINE('Test');
5 end;
6 /
Procedure created.
SQL> set serveroutput on
SQL> begin
2 temp_proc;
3 end;
4 /
Test
PL/SQL procedure successfully completed.
SQL>