简体   繁体   English

临时表在mysql存储过程中不存在

[英]temporary table does not exist in mysql stored procedure

i written a two Stored procedures in Mysql 我在Mysql写了两个存储过程

1.business logic(SP1),
2.dynamic temporary table creation(SP2)

in Sp2 am creating temp table
in sp1 am inserting values.. 
 am calling SP2 in SP1.. 

if i call SP1 from console application its working fine but.. 如果我从控制台应用程序调用SP1 ,它的工作正常,但是..

if i calling same stored procedure SP1 in web application its throwing an Exception like temporary table not exist .. 如果我在web application same stored procedure SP1调用same stored procedure SP1 ,则抛出诸如temporary table not exist类的Exception temporary table not exist ..

why its happen like this ???
any suggestions ?? tell me the reason..

thanks in advance.. 提前致谢..

The temp table is out of scope when you called it from sp1. 从sp1调用临时表时,该表不在范围内。 It only exist within sp2 它仅存在于sp2中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM