<bdo id='KxDAs'></bdo><ul id='KxDAs'></ul>
    <i id='KxDAs'><tr id='KxDAs'><dt id='KxDAs'><q id='KxDAs'><span id='KxDAs'><b id='KxDAs'><form id='KxDAs'><ins id='KxDAs'></ins><ul id='KxDAs'></ul><sub id='KxDAs'></sub></form><legend id='KxDAs'></legend><bdo id='KxDAs'><pre id='KxDAs'><center id='KxDAs'></center></pre></bdo></b><th id='KxDAs'></th></span></q></dt></tr></i><div id='KxDAs'><tfoot id='KxDAs'></tfoot><dl id='KxDAs'><fieldset id='KxDAs'></fieldset></dl></div>
    <legend id='KxDAs'><style id='KxDAs'><dir id='KxDAs'><q id='KxDAs'></q></dir></style></legend>

      <small id='KxDAs'></small><noframes id='KxDAs'>

    1. <tfoot id='KxDAs'></tfoot>

    2. 删除 MySQL 中的所有存储过程或使用临时存储过程

      Drop all stored procedures in MySQL or using temporary stored procedures(删除 MySQL 中的所有存储过程或使用临时存储过程)
        <bdo id='ckrPJ'></bdo><ul id='ckrPJ'></ul>

        <small id='ckrPJ'></small><noframes id='ckrPJ'>

        • <legend id='ckrPJ'><style id='ckrPJ'><dir id='ckrPJ'><q id='ckrPJ'></q></dir></style></legend>
                <tfoot id='ckrPJ'></tfoot>
                  <tbody id='ckrPJ'></tbody>
                <i id='ckrPJ'><tr id='ckrPJ'><dt id='ckrPJ'><q id='ckrPJ'><span id='ckrPJ'><b id='ckrPJ'><form id='ckrPJ'><ins id='ckrPJ'></ins><ul id='ckrPJ'></ul><sub id='ckrPJ'></sub></form><legend id='ckrPJ'></legend><bdo id='ckrPJ'><pre id='ckrPJ'><center id='ckrPJ'></center></pre></bdo></b><th id='ckrPJ'></th></span></q></dt></tr></i><div id='ckrPJ'><tfoot id='ckrPJ'></tfoot><dl id='ckrPJ'><fieldset id='ckrPJ'></fieldset></dl></div>
              1. 本文介绍了删除 MySQL 中的所有存储过程或使用临时存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                有没有可以删除MySQL中所有存储过程的语句?或者(如果第一个不可能),MySQL 中是否有临时存储过程之类的东西?类似于临时表的东西?

                Is there a statement that can drop all stored procedures in MySQL? Alternatively (if the first one is not possible), is there such thing as temporary stored procedures in MySQL? Something similar to temporary tables?

                推荐答案

                由于 DROP PROCEDURE 和 DROP FUNCTION 不允许子选择,我以为可以通过另一个存储过程来执行操作,但唉,MySQL 没有允许存储过程删除其他存储过程.

                Since DROP PROCEDURE and DROP FUNCTION does not allow sub selects, I thought it might be possible to perform the operation through another stored procedure, but alas, MySQL does not allow stored procedures to drop other stored procedures.

                无论如何,我试图通过创建准备好的语句来欺骗 MySQL,从而将 drop 调用与存储过程分开,但我没有运气.

                I tried to trick MySQL to to this anyway by creating prepared statements and thus separating the drop call somewhat from the stored procedure, but I've had no luck.

                因此,我唯一的贡献是这个 select 语句,它创建了删除所有存储过程和函数所需的语句列表.

                So therefore my only contribution is this select statement which creates a list of the statements needed to drop all stored procedures and functions.

                SELECT
                    CONCAT('DROP ',ROUTINE_TYPE,' `',ROUTINE_SCHEMA,'`.`',ROUTINE_NAME,'`;') as stmt
                FROM information_schema.ROUTINES;
                

                这篇关于删除 MySQL 中的所有存储过程或使用临时存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)
              2. <tfoot id='9yXPx'></tfoot>

                  <i id='9yXPx'><tr id='9yXPx'><dt id='9yXPx'><q id='9yXPx'><span id='9yXPx'><b id='9yXPx'><form id='9yXPx'><ins id='9yXPx'></ins><ul id='9yXPx'></ul><sub id='9yXPx'></sub></form><legend id='9yXPx'></legend><bdo id='9yXPx'><pre id='9yXPx'><center id='9yXPx'></center></pre></bdo></b><th id='9yXPx'></th></span></q></dt></tr></i><div id='9yXPx'><tfoot id='9yXPx'></tfoot><dl id='9yXPx'><fieldset id='9yXPx'></fieldset></dl></div>

                    <tbody id='9yXPx'></tbody>

                  <small id='9yXPx'></small><noframes id='9yXPx'>

                    <bdo id='9yXPx'></bdo><ul id='9yXPx'></ul>

                    1. <legend id='9yXPx'><style id='9yXPx'><dir id='9yXPx'><q id='9yXPx'></q></dir></style></legend>