left join or
时间: 2023-09-13 14:13:31 浏览: 89
SQL中的left join right join
right join在使用时的区别是什么?
在使用left join时,左表(即左侧的表格)的记录数与left join后的结果记录数相同,而使用right join时,右表(即右侧的表格)的记录数与right join后的结果记录数相同。换句话说,left join会返回左表的全部记录,而right join会返回右表的全部记录。这是因为left join以左表为准,将左表的记录与右表进行连接,而right join以右表为准,将右表的记录与左表进行连接。所以left join和right join是等价的,只是连接顺序不同。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Hive中Left Join基于or形式匹配连接的一种优雅实现方式](https://blog.csdn.net/godlovedaniel/article/details/125126193)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [oracle中left join和right join的区别浅谈](https://download.csdn.net/download/weixin_38524139/13702928)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文