连表查询
select
a, b, c
from
table_a tb_a
left (right) join
table_b tb_b
on
tb_a.id = tb_b.id
left : table_a, table_b 左边不满足条件的也返回
right : table_a, table_b 又边不满足条件的也返回
inner join : 只返回满足条件的查询结果