Subject Re: [firebird-support] Re: Stored Procedure as a Function?
Author Helen Borrie
At 12:45 PM 26/09/2003 +0200, Set wrote:

> > Martijn,
> > I also assumed one could do something like
> >
> > select foo.col1, xy.outputparam
> > from foo
> > join xy on foo.col2 = xy.inputparam
> >
> > Though yet again I speak without knowledge, so please tell me whether I am
>right or wrong.
>I've never seen that syntax and according to my
>Firebird install, it doesn't work either.
>With regards,
>Martijn Tonies

No, and there's no reason why it would. A SP has to (1) receive its input
parameters (2) have somewhere to put its output and (3) actually *execute*
in order to yield its output or do whatever else it was designed to do.

The answer to the original question is that stored procedures are not
functions. They provide a way to "pot up" some SQL operations inside a
black box. UDFs, by contrast, operate only on constants: they don't
perform database operations.