MySQL Forums
Forum List  »  Stored Procedures

Re: How to Exec variable contenting SQL statement in Procedure?
Posted by: Atanas Todorov
Date: March 29, 2005 12:45AM

you can try with prepare statement:

set @query = 'select count (*) from tablename';
prepare getcount from @query
execute getcount
deallocate prepare getcount

but as I know prepared statements are not accessible in MySQL 5.x-alpha...

Options: ReplyQuote

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.