Mysql以一定的时间间隔自动去运行这个脚本文件
时间:2008-09-18 来源:dandunn
mysql> delimiter || mysql> create procedure sp_test_sleep() -> sql security invoker -> begin -> select 'sleep start'; -> select sleep(5); -> select 'sleep end'; -> end|| Query OK, 0 rows affected (0.03 sec) mysql> delimiter ; mysql> call sp_test_sleep(); +-------------+ | sleep start | +-------------+ | sleep start | +-------------+ 1 row in set (0.00 sec) +----------+ | sleep(5) | +----------+ | 0 | +----------+ 1 row in set (5.00 sec) +-----------+ | sleep end | +-----------+ | sleep end | +-----------+ 1 row in set (5.00 sec) Query OK, 0 rows affected (5.00 sec) mysql>
相关阅读 更多 +