Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: functions vs procedures
"Mark & Kristi Wagoner" <mwagoner_at_iac.net> wrote in message
news:a51ci7$29pp$1_at_genma.iac.net...
> > Is there a way to insert records in a function?
>
> Yes. Functions can do the same operations as a procedure. They just have
a
> return value.
>
While you can do that it is not a good programming practice. This is called
having a function with side effects.
That is I call a function - expecting just a return - and it gives me a
return and does something else. This is why we have procedures. Use out
parameters for what you want to do.
Jim
> > I want to use functions because i can fetch the error messages then.
>
> Depending on what you are doing, you may want to look into exceptions.
Your
> function (or procedure) can raise an exception, which the caller can trap
> and get the message.
>
> > How can I combine functions and procedures????
>
> You can also have the function call the procedure, if it helps.
>
> >
> > Thank you already,
> >
> > Julian Kooiker
> >
> >
>
>
Received on Wed Feb 20 2002 - 21:22:53 CST