方法)表连结

  • 没有任务的也要输出
    SELECT p.id, p.name, t.content
    FROM person AS p LEFT JOIN task AS t
    ON p.id = t.person_id;