MySQL Forums
Forum List  »  UDF

Get result of executing prepared statement in UDF
Posted by: Tom Byars
Date: May 06, 2015 04:55AM

I've got the following line in a UDF

select x from ComplexQuery into S;
return S;

I'd like to prepare the ComplexQuery outwith the UDF to speed up the UDF as it's called many times.

If I prepare the query as in

prepare ComplexQuery from '....complex query sql text';

how could I get the result in the UDF as

execute ComplexQuery using @i,@j into S;
return S;

doesn't work.

Options: ReplyQuote


Subject
Views
Written By
Posted
Get result of executing prepared statement in UDF
1502
May 06, 2015 04:55AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.