SELECT * FROM d_bd_bideval AS a INNER JOIN d_bd_bid AS bid ON a.bidid = bid.bidid INNER JOIN d_bd_bidevalexpertdtl AS b ON a.bidevalid = b.bidevalid WHERE ( b.expertmajortype = 'ExpertMajorType_001' OR bid.scoreMethod = 'unEval' ) AND ( a.bidEvalNo LIKE '%BED20230315000002%' ) 我要对这一段sql语句进行去重
时间: 2024-03-09 09:45:12 浏览: 63
SQL SELECT 语句
对于这段SQL语句,如果你想去重复数据,可以使用DISTINCT关键字来实现。修改后的SQL语句如下:
```
SELECT DISTINCT a.*, bid.*, b.*
FROM d_bd_bideval AS a
INNER JOIN d_bd_bid AS bid ON a.bidid = bid.bidid
INNER JOIN d_bd_bidevalexpertdtl AS b ON a.bidevalid = b.bidevalid
WHERE (b.expertmajortype = 'ExpertMajorType_001' OR bid.scoreMethod = 'unEval')
AND (a.bidEvalNo LIKE '%BED20230315000002%')
```
这样就可以保证查询结果中没有重复的数据了。
阅读全文