时间:2021-07-01 10:21:17 帮助过:28人阅读
两张表联合查询,显示需要的信息
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`;
sql关联查询样例
标签:detail 显示 关联 rom sql left join join use tail