13) 数据库的内连接,左外连接,右外连接的区别,试举例。
1个回答
展开全部
表盯基a
aid aname
1 a1
2 a2
3 a3
表b
bid bname
1 b1
2 b2
4 b4
内联:select * from a inner join b on a.aid=b.bid
result:
1 a1 b1
2 a2 b2
左悄则侍联:select * from a left join b on a.aid=b.bid
result:
1 a1 b1
2 a2 b2
3 a3 空启吵字符
右联:select * from a right join b on a.aid=b.bid
result:
1 a1 b1
2 a2 b2
4 空字符 b4
aid aname
1 a1
2 a2
3 a3
表b
bid bname
1 b1
2 b2
4 b4
内联:select * from a inner join b on a.aid=b.bid
result:
1 a1 b1
2 a2 b2
左悄则侍联:select * from a left join b on a.aid=b.bid
result:
1 a1 b1
2 a2 b2
3 a3 空启吵字符
右联:select * from a right join b on a.aid=b.bid
result:
1 a1 b1
2 a2 b2
4 空字符 b4
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询