我将两个表连接在一起,我需要根据它们的条形码,看看表1(左侧)中的产品代码是否与右侧的产品代码匹配。我已经设法内连接条形码,并只显示匹配的条形码。现在的问题就是prdouct代码。
发布于 2019-02-25 14:57:48
这是你想要的吗?
select t1.*
from table1 t1
where not exists (select 1
from table2 t2
where t2.code = t1.product_code and t2.barcode = t1.barcode
);
这将从table2
中没有匹配项的table1
中选择行。
https://stackoverflow.com/questions/54868783
复制相似问题