呼如林
可以使用用户定义的变量在动态语句之外传递。Server version: 5.6.25-log MySQL Community Server (GPL)mysql> PREPARE stmt FROM 'select "AAAA" into @a';Query OK, 0 rows affected (0.01 sec)Statement preparedmysql> EXECUTE stmt;Query OK, 1 row affected (0.01 sec)DEALLOCATE prepare stmt;Query OK, 0 rows affected (0.01 sec)mysql> select @a;+------+| @a |+------+|AAAA |+------+1 row in set (0.01 sec)