1 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;