• <tfoot id='sl6kH'></tfoot>

    1. <small id='sl6kH'></small><noframes id='sl6kH'>

        <bdo id='sl6kH'></bdo><ul id='sl6kH'></ul>

      1. <legend id='sl6kH'><style id='sl6kH'><dir id='sl6kH'><q id='sl6kH'></q></dir></style></legend>
        <i id='sl6kH'><tr id='sl6kH'><dt id='sl6kH'><q id='sl6kH'><span id='sl6kH'><b id='sl6kH'><form id='sl6kH'><ins id='sl6kH'></ins><ul id='sl6kH'></ul><sub id='sl6kH'></sub></form><legend id='sl6kH'></legend><bdo id='sl6kH'><pre id='sl6kH'><center id='sl6kH'></center></pre></bdo></b><th id='sl6kH'></th></span></q></dt></tr></i><div id='sl6kH'><tfoot id='sl6kH'></tfoot><dl id='sl6kH'><fieldset id='sl6kH'></fieldset></dl></div>
      2. 如何在 MySQL 中调度存储过程

        时间:2023-05-23
          <tfoot id='Svc9C'></tfoot>

          <legend id='Svc9C'><style id='Svc9C'><dir id='Svc9C'><q id='Svc9C'></q></dir></style></legend>

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

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

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

                  问题描述

                  限时送ChatGPT账号..

                  我有这个存储过程.例如,我如何以 5 秒的间隔运行它?像消除时间戳超过一天的数据的例程吗?

                  I have this stored procedure. How can I run this for example with intervals of 5 seconds? Like a routine for eliminate data with a time-stamp older than one day?

                  DROP PROCEDURE IF EXISTS `delete_rows_links` 
                  GO
                  
                  CREATE PROCEDURE delete_rows_links
                  BEGIN 
                  
                      DELETE activation_link
                      FROM activation_link_password_reset
                      WHERE  TIMESTAMPDIFF(DAY, `time`, NOW()) < 1 ; 
                  
                  END 
                  
                  GO
                  

                  推荐答案

                  您可以使用 mysql 调度程序每 5 秒运行一次.您可以在 http://dev.mysql.com/doc/refman/5.1 找到示例/en/create-event.html

                  You can use mysql scheduler to run it each 5 seconds. You can find samples at http://dev.mysql.com/doc/refman/5.1/en/create-event.html

                  从未使用过它,但我希望这会奏效:

                  Never used it but I hope this would work:

                  CREATE EVENT myevent
                      ON SCHEDULE EVERY 5 SECOND
                      DO
                        CALL delete_rows_links();
                  

                  这篇关于如何在 MySQL 中调度存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何选择具有当天时间戳的行? 下一篇:MySQL 合并两列并添加到一个新列中

                  相关文章

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

                    <tfoot id='SpUzC'></tfoot>

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