描述
有一个person表,主键是id,如下:
id | name |
1 2 |
fh tm |
有一个任务(task)表如下,主键也是id,如下:
id | person_id | content |
1 2 |
2 2 |
tm1 works well tm2 works well |
请你找到每个人的任务情况,并且输出出来,没有任务的也要输出,而且输出结果按照person的id升序排序,输出情况如下:
id | name | content |
1 2 2 |
fh tm tm |
NULL tm1 works well tm2 works well |
示例1
输入:
drop table if exists person; drop table if exists task; CREATE TABLE `person` ( `id` int(4) NOT NULL, `name` varchar(32) NOT NULL, PRIMARY KE