sql SQL命令用于清除超过30天的InfiniteWP已删除站点和活动数据。默认的InfiniteWP表前缀是iwp_,i

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql SQL命令用于清除超过30天的InfiniteWP已删除站点和活动数据。默认的InfiniteWP表前缀是iwp_,i相关的知识,希望对你有一定的参考价值。

DELETE FROM iwp_history WHERE siteID NOT IN (SELECT siteID FROM iwp_sites);
DELETE FROM iwp_history WHERE microtimeAdded < (UNIX_TIMESTAMP() - 2592000);
DELETE FROM iwp_history_additional_data WHERE historyID NOT IN (SELECT historyID FROM iwp_history);
DELETE FROM iwp_history_raw_details WHERE historyID NOT IN (SELECT historyID FROM iwp_history);
DELETE FROM iwp_site_stats WHERE siteID NOT IN (SELECT siteID FROM iwp_sites);
DELETE FROM iwp_user_access WHERE siteID NOT IN (SELECT siteID FROM iwp_sites);
DELETE FROM iwp_groups_sites WHERE siteID NOT IN (SELECT siteID FROM iwp_sites);

以上是关于sql SQL命令用于清除超过30天的InfiniteWP已删除站点和活动数据。默认的InfiniteWP表前缀是iwp_,i的主要内容,如果未能解决你的问题,请参考以下文章

Oracle SQL Where 子句查找超过 30 天的日期记录

sql SQL:删除超过“X”天的帖子

sql SQL:识别超过'X'天的任何帖子

mysql怎么自动删除超过3天的数据

SQL:过去 30 天的滚动总和(按组)

sql 清除超过一周的备份表