MySQL多表连接操作
时间:2021-07-01 10:21:17
帮助过:18人阅读
select * from userinfo ,dapartment
where userinfo.part_id
= dapartment.id;
2 --左连接: 左边全部显示
3 select * from userinfo
left join dapartment
on userinfo.part_id
=dapartment.id;
4 --右连接:右边的全部显示
5 select * from userinfo
right join dapartment
on userinfo.part_id
=dapartment.id;
6 --内连接: 将出现null的一行隐藏
7 select * from userinfo
inner join dapartment
on userinfo.part_id
= dapartment.id;
MySQL多表连接操作
标签:div 多表 多表连接 inf 内连接 info use HERE inner