参考:
mysql 存储过程中动态执行 sql 文
2 + POW ?,mysql> PREPA RE stmt1 FROM 'SELECT SQRT POW ?.2 AS hypotenuse';
mysql> SET @a = 3;
mysql> SET @b = 4;
@b;</SPONGMYSQL> class=userinput EXECUTE stmt1 USING @a.>
mysql> SET @a = 'select * from table1 ';
mysql> SET @b = 'where column1>10 limit 1';
@b mysql> SET @a =
concat @a.;
mysql> PREPA RE stmt1 FROM
@a;
mysql> EXECUTE stmt1;