Thank you for your speedy reply.
I tried on your way. But it gives *error* as "*Dynamic SQL is not allowed in
stored function or trigger*". I'm using *MySql 5* as my sever. How can I
solve that.
thank you
On Mon, Mar 15, 2010 at 11:43 PM, Gavin Towey wrote:
> You'll have to do something like t
You'll have to do something like this:
SET @sql := CONCAT('select ',columnname,' into retval from user where ID=',id);
PREPARE mySt FROM @sql;
EXECUTE mySt;
-Original Message-
From: chamila gayan [mailto:cgcham...@gmail.com]
Sent: Monday, March 15, 2010 12:58 AM
To: mysql@lists.mysql.co