sql问题,谁能帮我转换成关联查询。

no_user 发布于 2013/11/04 01:03
阅读 127
收藏 0
SELECT * FROM tbl_product p WHERE p.user_id in (SELECT info_user_id FROM tbl_user_info ui WHERE ui.info_province = 3) OR p.user_id in (SELECT ci.company_user_id FROM tbl_company_info ci WHERE ci.company_province = 3);
加载中
0
Choate
Choate
SELECT * FROM tbl_product p LEFT JOIN  tbl_user_info ui ON ui.info_user_id = p.user_id LEFT JOIN tbl_company_info ci ON p.user_id = ci.company_user_id WHERE ui.info_province = 3 OR complan_province = 3;
no_user
no_user
辛苦了!
返回顶部
顶部