连表查询
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 : 只返回满足条件的查询结果
标签:pos body bsp 返回 div rom blog ble sele
连表查询
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 : 只返回满足条件的查询结果
标签:pos body bsp 返回 div rom blog ble sele
原文地址:https://www.cnblogs.com/lixuchun/p/8716646.html