本文介绍了左连接vs右连接在sql中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么在有左连接时使用右连接我的意思是如果我需要从左表查看数据我总是把表放在连接的左边那么为什么要引入右连接?
Why to use Right Join when there is Left Join i mean if i need to view data from left table i always place the table on the left of the join then why the right join is introduced?
推荐答案
SELECT *
FROM LeftTable
RIGHT JOIN MiddleTable USING SomeID
LEFT JOIN RightTable USING SomeOtherID
It可以使用左联接来完成,但这样更容易理解
所以答案是清晰的。
It could be done using to left joins, but it's easier to understand this way
So the answer is clarity.
这篇关于左连接vs右连接在sql中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!