1. 无效
select * from term_info
where 1 = 1
AND
company_no = 2
and term_no not in ( select GROUP_CONCAT(term_no) from p_info where company_no = 2 and id != 1 )
where 1 = 1
AND
company_no = 2
and term_no not in ( select GROUP_CONCAT(term_no) from p_info where company_no = 2 and id != 1 )
2. 有效
select * from term_info
where 1 = 1
AND
company_no = 2
and not INSTR(( select GROUP_CONCAT(term_no) from p_info where company_no = 2 and id != 1 ) ,term_no)
AND
company_no = 2
and not INSTR(( select GROUP_CONCAT(term_no) from p_info where company_no = 2 and id != 1 ) ,term_no)