set @clientsql=concat('select downtype into ',var_downtype,' from kkr_client_download_count_t_',varyearmonth,' where downtype=1 group by downtype'); select @clientsql; prepare stmt from @clientsql;
EXECUTE stmt;
deallocate prepare stmt;
请教高人,为何打印为空: +------------+
| @clientsql |
+------------+
| NULL |
+------------+ 谢谢!
EXECUTE stmt;
deallocate prepare stmt;
请教高人,为何打印为空: +------------+
| @clientsql |
+------------+
| NULL |
+------------+ 谢谢!
http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html8、如何给分和结贴?
http://community.csdn.net/Help/HelpCenter.htm#结帖
select @clientsql,var_downtype,varyearmonth; 证明一下它们不为NULL
@开头的..
如:
mysql> call asdaa('@sq')
-> ;
Query OK, 0 rows affected (0.00 sec)mysql> select @sq
-> ;
+------+
| @sq |
+------+
| A |
+------+
1 row in set (0.00 sec)