inner join 数据重复
时间: 2023-09-22 08:10:45 浏览: 195
inner join不会导致数据重复。在使用inner join时,只会返回那些在两个表中都存在匹配的行。如果在一个表中有多个匹配的行,则返回的结果集中也会有多个重复的行。但是,这并不是inner join导致的数据重复,而是每个匹配的行都会分别出现在结果集中。因此,可以通过在查询中添加合适的条件来去除重复的行,比如使用distinct关键字或者group by子句进行分组。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [left join、right join、inner join关联查询时出现重复数据](https://blog.csdn.net/weixin_42289383/article/details/89095485)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [mysql 开发技巧之JOIN 更新和数据查重/去重](https://download.csdn.net/download/weixin_38528939/14836741)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [SQL INNER/LEFT JOIN出现重复数据无法关联](https://blog.csdn.net/m0_52813850/article/details/124002037)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文