mysql多表过滤查询又不需要其他表的字段的语法

select * from policy p where  p.product_code ='PL00035' and p.app_flag=1 
                        and 
                        exists (select 1 from policy_risk where policy_no = p.policy_no GROUP BY policy_no HAVING count(id)>1  ) and p.pay_method!=0
                        ;

 

posted @ 2024-05-11 15:06  乐乐熊小妹  阅读(4)  评论(0编辑  收藏  举报