- wrote:
> i tried several ways:
>
> 1) SET count = CALL some_procedure(...);
> 2) IF ((CALL some_procedure(...)) ...) THEN
>
> but both produce an error.
A procedure that returns a value instead of having an OUT parameter is
called a FUNCTION. This is created with the CREATE FUNCTION statement.
Functions are very similar to procedures, except that they cannot
reference any tables; that is, they can't perform queries.
Looking in the grammar source code for MySQL 5.0.2, there _appears_ to
be support for queries of the form:
SELECT * FROM PROCEDURE procname();
But I can't get it to work. It might be an unfinished feature. We are
using 5.0 alpha, after all.
Is it a problem to use a variable and fill it by passing it as an OUT
parameter to the procedure?
Regards,
Bill K.
>> Stay informed about: accessing the return value of called procedure