摘要:
-------distinct 去重复查询select * from accounts acc join (select distinct accid from roles) r on r.accid=acc.ID-----不需要distinct select * from (select MAX(ID)roleid,accid from roles group by accid) rr join (select * from accounts) acc on acc.ID=rr.accid--------解释一下不用distinct 去重复查询语句Select * from (Select 阅读全文