简体   繁体   English

如何从存储过程中创建存储过程

[英]how do I create a stored procedure from within a stored procedure

I would like to manage the deploy of stored procedures by first inserting them into a table, then, when it's time to deploy.... use a stored procedure to create all of the stored procedures. 我想通过先将存储过程插入表中,然后在需要进行部署的时候来管理存储过程的部署。...使用存储过程来创建所有存储过程。 (Execute seems to be limited to CRUD) (执行似乎仅限于CRUD)

I'm not sure if this is what you looking for, but its has a good example and a reference at the bottom. 我不确定这是否是您要寻找的东西,但是它有一个很好的例子,并在底部提供了参考。

http://forums.mysql.com/read.php?98,219523,219787#msg-219787 http://forums.mysql.com/read.php?98,219523,219787#msg-219787

Matthew H. 马修H.

This is not possible with MySQL. 对于MySQL,这是不可能的。 In stored procedures and functions you have even more restrictions in language use then in prepared statements. 在存储过程和函数中,对语言的使用要比在准备好的语句中受到更多的限制。

The list of acceptable commands for prepared statements (see manual ) does not include create procedure . 准备好的语句可接受的命令列表(请参见手册 )不包括create procedure

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

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