MySQL Forums
Forum List  »  Stored Procedures

How to Exec variable contenting SQL statement in Procedure?
Posted by: Tuan Nguyen
Date: March 21, 2005 04:12AM

I have one procedure Such as:
create procedure (in Fieldname varchar(100))
begin
declate SQL varchar(200);
set SQL='select '+Fieldname+' From Table1 where CodeID=0001';
Exec SQL;
'here i want to exec SQL variable SQL the same SQL server, but i can not
end
-I need so much, Help me, thanks.

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.