mysql 问题 这两个sql 结果不同,不知为何,请各位大神指点!
SELECT DISTINCT k1.t_goods_id from t_sales_entry_detail k1 LEFT JOIN t_sales_entry k2 on k1.t_sales_entry_id =k2.id where k2.sys_office_id='902cb4b0f15c4c3d9695c718823f2ec7' and k2.document_status='2';SELECT DISTINCT k1.t_goods_id from t_sales_entry_detail k1 where EXISTS (
select k2.id from t_sales_entry k2 where k2.id = k1.t_sales_entry_id and k2.sys_office_id='902cb4b0f15c4c3d9695c718823f2ec7' and k2.document_status='2') ;