L
lcj
Unregistered / Unconfirmed
GUEST, unregistred user!
我在建立Oracle Package的过程中,建立函数时,如下代码:
create or replace package pk1 as
function insertrec(val1 number) return number;
end;
/
create or replace package body pk1 as
function insertrec(val1 number) return number
as
begin
insert into aa values(val1);
commit;
return 1;
end insertrec;
end pk1;
/
建立后我执行下列语句(附上错误语句):
SQL> select pk1.insertrec(1) from dual;
select pk1.insertrec(1) from dual
*
ERROR at line 1:
ORA-06571: Function INSERTRECdo
es not guarantee not to update database
请问如何解决?谢谢!
create or replace package pk1 as
function insertrec(val1 number) return number;
end;
/
create or replace package body pk1 as
function insertrec(val1 number) return number
as
begin
insert into aa values(val1);
commit;
return 1;
end insertrec;
end pk1;
/
建立后我执行下列语句(附上错误语句):
SQL> select pk1.insertrec(1) from dual;
select pk1.insertrec(1) from dual
*
ERROR at line 1:
ORA-06571: Function INSERTRECdo
es not guarantee not to update database
请问如何解决?谢谢!