MySQL trigger/procedure execution delay

前端 未结 2 2121
忘掉有多难
忘掉有多难 2020-12-17 00:01

Is there a decent way to delay execution of mysql trigger?

WHILE @condition = 0
  sleep for awhile

insert into some_table values(NEW.value1, NEW.value2);
<         


        
2条回答
  •  失恋的感觉
    2020-12-17 00:13

    Since MySQL 5.0.12, you can do this:

    SELECT SLEEP();
    

    The seconds parameter can be in a fraction of a second like .5.

提交回复
热议问题