DELETE FROM tr_corp_planweekly t
WHERE EXISTS (
SELECT 1 FROM tr_corp_planweekly t1
INNER JOIN te_plan_monthly t2 ON t1.weekly_id = t2.ID
WHERE t1.weekly_id = t.weekly_id);
一个sql,用到exists
最新推荐文章于 2024-01-09 16:12:38 发布
DELETE FROM tr_corp_planweekly t
WHERE EXISTS (
SELECT 1 FROM tr_corp_planweekly t1
INNER JOIN te_plan_monthly t2 ON t1.weekly_id = t2.ID
WHERE t1.weekly_id = t.weekly_id);