LambdaQueryWrapper如何去重
时间: 2023-10-15 20:26:19 浏览: 120
LambdaQueryWrapper可以使用selectDistinct方法来实现去重。在查询中,可以使用lambda表达式指定需要去重的字段,然后调用selectDistinct方法。对于给定的示例代码,可以将select("DISTINCT version")修改为selectDistinct("version")来实现去重。这样查询结果中的version字段将不会包含重复的值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [如何用LambdaWrapper去实现去重查询](https://blog.csdn.net/HRX98/article/details/127120730)[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_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Java Lambda 表达式List 对象去重](https://blog.csdn.net/weixin_40986713/article/details/121809966)[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_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文