mysql>
mysql> delimiter $$
mysql>
mysql> create procedure set_col_value
-> (in_table varchar(128),
-> in_column varchar(128),
-> in_new_value varchar(1000),
-> in_where varchar(4000))
->
-> begin
-> declare l_sql varchar(4000);
-> set l_sql=concat_ws(' ',
-> 'update',in_table,
-> 'set',in_column,'=',in_new_value,
-> ' where',in_where);
-> set @sql=l_sql;
-> prepare s1 from @sql;
-> execute s1;
-> deallocate prepare s1;
-> end$$
query ok, 0 rows affected (0.00 sec)