![](/img/trans.png)
[英]SQL JOIN with WHERE condition when two rows' values are the same and one row matches to two different rows
[英]Display all rows of same value if either of row matches a where condition
如果 BaseItem = APO_Product 我想顯示 NLLLFLF02 的所有行。 當所有驗證 where 條件的行時,我想刪除不匹配的行。
看來你需要在
DELETE t1
FROM W93zE8Z8 t1
LEFT JOIN W93zE8Z8 t2 ON t1.GROUP_4 = t2.GROUP_4
AND t2.BaseItem = t2.APO_Product
WHERE t2.GROUP_4 IS NULL
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.