delete * from table where id between 70 and 100
--или
delete * from table where id >= 70 and id =< 100
-- Cleaning wp_commentmeta
SELECT *
FROM wp_commentmeta
WHERE comment_id NOT IN (SELECT comment_id FROM wp_comments);
DELETE FROM wp_commentmeta
WHERE comment_id NOT IN (SELECT comment_id FROM wp_comments);
SELECT *
FROM wp_commentmeta
WHERE meta_key LIKE '%akismet%';
DELETE FROM wp_commentmeta
WHERE meta_key LIKE '%akismet%';
-- Cleaning wp_postmeta table
SELECT *
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL;
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL;
SELECT T1.PRIVILEGE,
T1.ADMIN_OPTION SYS_USER,
T2.ADMIN_OPTION MY_USER
FROM DBA_SYS_PRIVS T1
LEFT JOIN DBA_SYS_PRIVS T2 ON T1.PRIVILEGE = T2.PRIVILEGE
AND T2.GRANTEE = 'MY_USER'
WHERE T1.GRANTEE = 'SYS'
ORDER BY T1.PRIVILEGE ASC