没有任务的也要输出——>外联结left join
按照person的id升序排序——>order by ... asc
注意id是与person_id对应的,这俩才是联结条件。
select a.id,a.name,b.content from person a left join task b on a.id = b.person_id order by a.id asc;
没有任务的也要输出——>外联结left join
按照person的id升序排序——>order by ... asc
注意id是与person_id对应的,这俩才是联结条件。
select a.id,a.name,b.content from person a left join task b on a.id = b.person_id order by a.id asc;