聘我网

新概念招聘3.0

mysql中怎么让一个event每24小时执行一次?

vote up0vote downstar

现在想要这条语句24小时执行一次:

delete tags from tags left join tagowners on tags.id=tagowners.tagId
where tagowners.tagId is null;
 

1 个答复

vote up0vote downcheck
CREATE EVENT cleartags
    ON SCHEDULE EVERY 24 HOUR
    DO 
      delete tags from tags left join tagowners on tags.id=tagowners.tagId
    where tagowners.tagId is null;
链接

您的回答





不是您要找的问题? 浏览其他含有标签 的问题或者 自己问个.