84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
A 表user_id phone1 12 2
B表user_id mail1 1
想连表得到C,没有找到相同user_id的默认为0
C表user_id phone mail1 1 12 2 0
mysql语句怎么写?
业精于勤,荒于嬉;行成于思,毁于随。
select A.user_id as user_id,A.phone as phone,coalesce(B.mail,0) as mailfrom A left join B on A.user_id=B.user_id
select A.user_id as user_id,A.phone as phone,coalesce(B.mail,0) as mail
from A left join B on A.user_id=B.user_id