日期:2014-05-16  浏览次数:20636 次

mysql存储过程[动态sql]
set aSql="select count(id),sum(price) into tclick,todayTotalrom adnote where 1=1 ";
set @_sSql = aSql; 
 prepare sqlstmt from @_sSql;  
 execute sqlstmt;

 好象不能执行

------解决方案--------------------
set @aSql="select count(id),sum(price) into @tclick,@todayTotalrom adnote where 1=1 ";
 prepare sqlstmt from @aSql;
 execute sqlstmt;

------解决方案--------------------
探讨
引用:
set @aSql="select count(id),sum(price) into @tclick,@todayTotalrom adnote where 1=1 ";
prepare sqlstmt from @aSql;
execute sqlstmt;


您好,这样可以执行,但是无法通过@tclick返回

因为@tclick我是通过存储过程返回的