JOIN 按照功能大致分为如下三类:
inner join 用法:
select a.code,b.money from biz_water_user a inner JOIN t_charge_account b on a.id=b.user_id //inner join 也可直接用join效果一样
select a.code,b.money from biz_water_user a,t_charge_account b where a.id=b.user_id //此sql语句等价于上面的sql
left join 用法:
select a.code,b.money from biz_water_user a left JOIN t_charge_account b on a.id=b.user_id
right join 用法:
select a.code,b.money from biz_water_user a right JOIN t_charge_account b on a.id=b.user_id