• <legend id='0ABxs'><style id='0ABxs'><dir id='0ABxs'><q id='0ABxs'></q></dir></style></legend>
  • <small id='0ABxs'></small><noframes id='0ABxs'>

      • <bdo id='0ABxs'></bdo><ul id='0ABxs'></ul>
      <i id='0ABxs'><tr id='0ABxs'><dt id='0ABxs'><q id='0ABxs'><span id='0ABxs'><b id='0ABxs'><form id='0ABxs'><ins id='0ABxs'></ins><ul id='0ABxs'></ul><sub id='0ABxs'></sub></form><legend id='0ABxs'></legend><bdo id='0ABxs'><pre id='0ABxs'><center id='0ABxs'></center></pre></bdo></b><th id='0ABxs'></th></span></q></dt></tr></i><div id='0ABxs'><tfoot id='0ABxs'></tfoot><dl id='0ABxs'><fieldset id='0ABxs'></fieldset></dl></div>
    1. <tfoot id='0ABxs'></tfoot>

        在 MySQL 中的存储过程中调用存储过程

        Calling a Stored Procedure in a Stored Procedure in MySQL(在 MySQL 中的存储过程中调用存储过程)

            <small id='44Kv3'></small><noframes id='44Kv3'>

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

                <bdo id='44Kv3'></bdo><ul id='44Kv3'></ul>
                  <tfoot id='44Kv3'></tfoot>

                    <tbody id='44Kv3'></tbody>
                  <legend id='44Kv3'><style id='44Kv3'><dir id='44Kv3'><q id='44Kv3'></q></dir></style></legend>
                  本文介绍了在 MySQL 中的存储过程中调用存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在任何地方都找不到这个答案,但是您可以从 MySQL 中的另一个存储过程调用存储过程吗?我想取回标识值并在父存储过程中使用它.我们不能再使用 FUNCTIONS!

                  I can't find this answer anywhere, but can you call a Stored Procedure from another Stored Procedure in MySQL? I want to get the Identity Value back and use it in the parent Stored Procedure. We can't use FUNCTIONS anymore!

                  推荐答案

                  CREATE PROCEDURE innerproc(OUT param1 INT)
                  BEGIN
                   insert into sometable;
                   SELECT LAST_INSERT_ID() into param1 ;
                  END
                  -----------------------------------
                  CREATE PROCEDURE outerproc()
                  BEGIN
                  CALL innerproc(@a);
                  // @a gives you the result of innerproc
                  SELECT @a INTO variableinouterproc FROM dual;
                  END
                  

                  OUT 参数应该可以帮助您将值返回给调用过程.基于此,解决方案必须是这样的.

                  OUT parameters should help you in getting the values back to the calling procedure.Based on that the solution must be something like this.

                  这篇关于在 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 秒)
                  <legend id='24ag2'><style id='24ag2'><dir id='24ag2'><q id='24ag2'></q></dir></style></legend>
                • <tfoot id='24ag2'></tfoot>

                    <bdo id='24ag2'></bdo><ul id='24ag2'></ul>
                      <tbody id='24ag2'></tbody>
                      1. <small id='24ag2'></small><noframes id='24ag2'>

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