SELECT mp.institute_id,
mp.category_id,
mp.mapp_branch_id,
mp.mapp_product_id
FROM mapping_with_products mp
LEFT JOIN categories cat ON cat.id = mp.category_id
WHERE mp.mapp_product_id IN ( 5 ,12 ,34 ,90 ,123 )
ORDER BY mp.category_id DESC
(IN)函数不适用于JOINS,执行查询但未显示数据,我已经检查过,数据已映射为给定ID
答案 0 :(得分:0)
IN函数没有问题,只需运行不带Where子句的查询,并检查是否获得了mp.mapp_product_id的以下值。 5,12,34,90,123