hibernate查询不重复记录
- 作者: 熊大Love熊二
- 来源: 51数据库
- 2021-01-28
我建议要用种式要set排序或者增加其条件麻烦并且写配置文件灵
我项目都两取数据第取AA做条件取B取少条排序都科
加个distinct就可去重了,如下:
select b.a distinct from b where b.name='xx' and b.a.dept='pp'
我项目都两取数据第取AA做条件取B取少条排序都科
加个distinct就可去重了,如下:
select b.a distinct from b where b.name='xx' and b.a.dept='pp'
推荐阅读