executing a function in sql plus

maher picture maher · Feb 26, 2011 · Viewed 132.6k times · Source

I created a function in oracle that inserts records in specific tables and return an output according to what occurs within the function. e.g (ins_rec return number)

How do I call this function and see its output in sql plus

Answer

GriffeyDog picture GriffeyDog · Feb 28, 2011
declare
  x number;
begin
  x := myfunc(myargs);
end;

Alternatively:

select myfunc(myargs) from dual;