多表查询与连接查询

连接查询:内连接=inner join

     外连接:left join , right join

     全连接:full join

tableA inner join tableB on 条件

tableA left join tableB on 以左表为主

tableA right join tableB on 以右表为主

tableA full join tableB on

mysql 不支持全外连接

left join  union  right join  实现全外连接

猜你喜欢

转载自www.cnblogs.com/jintian/p/11123749.html