Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> insert in function not possible?
in sqlaw it's common practice to use functions like
create function f_newfoo(bar varchar)
as
begin
insert into foo(b) values (bar);
return @@identity;
end
try this in oarcle gives an ora-6571 ?!
what's wrong? why can't i modify the database in a function? using a stored proc seems to work but actually it's crap to use a procedure with an out-parameter to simulate a function.
how do i retrieve the current sequencevalue correctly?
ciao, jan Received on Tue Dec 15 1998 - 06:34:10 CST