查看存在zzj_temp1 不存在zzj_temp 中的品号数据
查看多个字段关联并把查询出来的字段连接两次
查询结果不要有重复行
select t1.ProductID from zzj_temp1 t1 where not exists (select * from zzj_temp t where t.ProductID=t1.ProductID)
查看多个字段关联并把查询出来的字段连接两次
select pq.ProductID,
group_concat(concat(l5.AreaCode,
l5.TypeCode,
l5.RowCode)) as locations
from twms_productlocationq pq, twms_location l5
where pq.LocationID=l5.LocationSeq
and pq.ProductID in(select productid from zzj_temp)
group by pq.ProductID
查询结果不要有重复行
select p.ProductID ,p.ProductNameConcat from twms_product p where p.productin in(
select productid from zzj_temp
)GROUP BY p.ProductID