当前位置: 移动技术网 > IT编程>数据库>Mysql > MySQL的join使用

MySQL的join使用

2019年12月11日  | 移动技术网IT编程  | 我要评论

#内连接
select * from auth_user u inner join auth_group g on u.id = g.id;

#左连接
select * from auth_user a left join auth_group b on a.id = b.id;

#右连接
select * from auth_user a right join auth_group b on a.id = b.id;

#左链接-内连接
select * from auth_user a left join auth_group b on a.id = b.id where b.id is null;

#右连接-内连接
select * from auth_user a right join auth_group b on a.id = b.id where b.id is null;

#mysql外连接不让使用full join 或者full outer join

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网