How and when to use SLEEP() correctly in MySQL?

前端 未结 2 655
醉梦人生
醉梦人生 2021-02-01 11:34

In relation to my other question today I am wondering how to use MySQL\'s SLEEP(duration) correctly.

From what I gathered reading MySQL Dev forums and very vague descrip

2条回答
  •  故里飘歌
    2021-02-01 12:27

    If you don't want to SELECT SLEEP(1);, you can also DO SLEEP(1); It's useful for those situations in procedures where you don't want to see output.

    e.g.

    SELECT ...
    DO SLEEP(5);
    SELECT ...
    

提交回复
热议问题