如果任一行匹配 where 条件,则显示所有具有相同值的行
Display all rows of same value if either of row matches a where condition
我已经坐了这么久了!对不起,我对此很陌生。看看这张图片
我的要求是:
如果BaseItem = APO_Product
我想显示NLLLFLF02
的所有行。当所有验证 where
条件的行时,我想删除不匹配的行。我已经尝试了很长时间,但对我来说没有任何效果。帮助!!
Table 姓名:W93zE8Z8
.
我希望这是我的输出:
If BaseItem = APO_Product I would like to show all the rows of NLLLFLF02. When all the rows that validate the where condition, I would like to delete the ones that don't match.
看来你需要在
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
我已经坐了这么久了!对不起,我对此很陌生。看看这张图片
我的要求是:
如果BaseItem = APO_Product
我想显示NLLLFLF02
的所有行。当所有验证 where
条件的行时,我想删除不匹配的行。我已经尝试了很长时间,但对我来说没有任何效果。帮助!!
Table 姓名:W93zE8Z8
.
我希望这是我的输出:
If BaseItem = APO_Product I would like to show all the rows of NLLLFLF02. When all the rows that validate the where condition, I would like to delete the ones that don't match.
看来你需要在
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