SQL两个表查询不要重复记录
select * from SoleTable as s left join commentstable as c on s.id=c.InfoId and c.InfoType= 'Sole ' and s.id is not null order by (select avg(CommentsIntegral) from commentstable where commentstable.InfoId=s.id) desc,ordernum desc
这样查询会有重复记录,怎么样才能查询出所有不重复的记录?谢谢大哥大姐了
------解决方案--------------------坐坐在,看问题
------解决方案--------------------哈哈,解决了,就结贴啊,那我接分了