这是我的查询,我不能更正。
SELECT a.pack_id
FROM (
SELECT pl.pack_id
FROM tbl_metals_list ml
LEFT JOIN tbl_pack_list pl ON ml.pack_id = pl.pack_id
WHERE ml.sale_agent_id = '3' AND pl.current_tab='metals') a
UNION(
SELECT pl.pack_id
FROM tbl_refining tr
LEFT JOIN tbl_pack_list pl ON tr.pack_id = pl.pack_id
WHERE tr.sale_agent_id ='3' AND pl.current_tab = 'refining') b