syntax error when declaring variables in a pl/sql procedure
CREATE OR REPLACE PROCEDURE MRCS.pro_xxx_test1 (cats out sys_refcursor)
IS
spoon number;
balls varchar2(3);
BEGIN
open cats for select * from dual;
end;
/
Remove the "DECLARE". Not needed in a function / procedure declaration
Declare local variable between IS
and BEGIN
block for procedure and function
CREATE OR REPLACE PROCEDURE MRCS.pro_xxx_test1 (cats out sys_refcursor)
IS
spoon number;
balls varchar2(3);
BEGIN
open cats for select * from dual;
end;
/