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

标签 mysql stored-procedures

我在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.. 

如果我从控制台应用程序调用SP1,它工作正常,但是..

如果我在Web应用程序中调用相同的存储过程SP1,它会抛出一个异常,例如临时表不存在 ..

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

提前致谢..

最佳答案

当您从 sp1 调用临时表时,它超出了范围。它只存在于sp2内

关于mysql - mysql存储过程中不存在临时表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23794882/

相关文章:

mysql - 复合索引中列的顺序

mysql - 嵌套循环而不同

返回更新记录的 SQL Server 存储过程

php - 按邮政编码距离升序计算和排序用户的最快方法(也是最优化的)

mysql - 使用 shell 脚本从一行中获取多个变量

MySQL 查询对其他行进行减法

php - 选择与特定值匹配的所有列,该值可以为空

mysql - Limit With order by 在mysql中只需要10条记录需要很长时间

c# - 从两个不同的文本框 ASP.NET C# 将两个数据插入同一列

mysql - 如何通过动态传递 columnName 使用 mysql 存储过程获取列