标签:detail 显示 关联 rom sql left join join use tail
两张表联合查询,显示需要的信息
SELECT b.`NAME`,a.`USER_ID`,a.num
FROM (
select `USER_ID`,count(*) AS num from af_person_deposit_detail_mem group by `USER_ID`
) a LEFT JOIN base_pc_user_info b on a.`USER_ID` = b.`USER_ID`;
标签:detail 显示 关联 rom sql left join join use tail
原文地址:http://www.cnblogs.com/yecao8888/p/6677534.html