sql进阶join

--都满足条件时连接
select * from abu_1 inner join abu_2 on abu_1.age = abu_2.age

--表一不变,满足条件的连接到表1
select * from abu_1 left join abu_2 on abu_1.age = abu_2.age


--表二不变,满足条件的连接到表2
select * from abu_1 right join abu_2 on abu_1.age = abu_2.age


--left和right的并集
select * from abu_1 outer join abu_2 on abu_1.age = abu_2.age

 

sql进阶join

上一篇:Qt-数据库操作


下一篇:sql语句进阶