sql 查询删除InfiniteWP站点历史记录和已删除站点的统计信息。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 查询删除InfiniteWP站点历史记录和已删除站点的统计信息。相关的知识,希望对你有一定的参考价值。

DELETE FROM iwp_history WHERE siteID NOT IN ( SELECT siteID FROM iwp_sites );

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 );

UPDATE iwp_sites SET adminUsername = 'todo' WHERE adminUsername = 'pronamic';

SELECT
	s.siteID,
	s.URL,
	s.name,
	s.adminUsername
FROM
	iwp_sites AS s
		LEFT JOIN
	iwp_groups_sites AS gs
			ON gs.siteID = s.siteID
WHERE
	gs.groupID = 3
;

以上是关于sql 查询删除InfiniteWP站点历史记录和已删除站点的统计信息。的主要内容,如果未能解决你的问题,请参考以下文章

oracle执行历史查不到执行sql

sqlyog关闭链接能查询历史记录

如何查询历史sql

Oracle学习(十三):闪回

Oracle学习(十三):闪回

sql如何查询历史同期记录