|Subject||Re: [firebird-support] returning_val|
> I have a question to usage and performance of stored procedures that return only one result row/value.I would always implement a singleton procedure result set as selectable
> Is there a performance drawback when I code it as a selectable procedure, or should I use always the execute procedure syntax and drop the suspend?
stored procedure. That way, you can use the procedure as an "inline"
select in your select statements. E.g.:
(select mycolumn from myproc(t.tablecolumn) ...) as anothercolumn
> Is it correct that I can not assign directly to a variable as with a UDF?Yes. Stored functions are AFAIK implemented in Firebird 3 HEAD. This
basically allows you to implement functions stored in the database
returning a scalar value.
Btw, in Firebird 2.5. You could also do the following with a selectable
myvar = (select mycolumn from myproc);
Thus, you don't need the INTO part anymore ...
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and