DELETE FROM yw2 where pid not in(select id FROM tb2) OR pid is NULL; 转载于:https://www.cnblogs.com/xiaohouzai/p/7653348.html