PL/SQL block doesn't set default values when passing null parameters to procedures
(
SOURCE1 INTEGER default 1 not null,
SOURCE2 INTEGER default 0 not null,
SOURCE3 INTEGER default -1 not null
)
Create or replace procedure anu_test(
a integer default 1,
b integer default 0,
c integer default -1)
as
Begin
INSERT INTO anu_test1 values(a,b,c);
end;
when passing no values to procedure, it should insert a row with 1,0 and -1 to table anu_test1 but it's giving error saying can't insert null. I debug the procedure and found that a,b and c comes with as null value from procedure.
Please let me know where is wrong happening?
Thanks,