MySQL有关调度的问题 [英] MySQL Question about scheduling
问题描述
我想问一下调度,是否有用于调度的MySQL命令.例如,我想将数据插入数据库.我可以编写一条sql语句将其保存一段时间,还是可以在预定的时间(例如,明天上午8:00)插入此数据.
I want to ask about scheduling, is there any MySQL command for scheduling. For example, I want to insert a data into the DB. Can I write a sql statement to hold it for some time, or maybe I insert this data in some scheduled time, for example, tomorrow 8:00 a.m.
我知道这些可以通过编程来完成,但是我想在SQL命令中完成,是否可以这样做?如果没有,有什么建议吗?
I know these can be done by programming, but I want to do it in SQL command, is it possible to do so? If not, any suggestions?
推荐答案
安排后台作业不是SQL命令集的一部分.因此,取决于每个数据库供应商提供自己的扩展.在Oracle中,它是一个PL/SQL软件包,DBMS_SCHEDULER
(在较旧的版本中为DBMS_JOB
).在MYSQL中,它似乎是事件计划程序,使用SQL语法.
Scheduling background jobs is not part of the SQL command set. So it is down to each database vendor to provide their own extension. In Oracle it is a PL/SQL package, DBMS_SCHEDULER
(or DBMS_JOB
in older versions). In MYSQL it would appear to be the Event Scheduler, which use SQL syntax.
修改
正如Paul Dixon指出的那样,事件计划程序是MySQL的相对较新的扩展(我不是MySQL专家,因此请原谅,如果这对您没有帮助).
As Paul Dixon has pointed out the Event Scheduler is a relatively recent extension to MySQL (I'm not a MySQL expert, so forgive if this is not helpful to you).
这篇关于MySQL有关调度的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!