distinct去掉重复问题,先谢啦~ SELECT DISTINCT type FROM user ORDER BY ID DESC这句话报错,说一定把ID放在type的后面但是放进去之后它就会有重复的出现,distinct就不起作用了,我想按照ID降序排列然后显示不重复的type,该怎么写呢?先谢啦!
------解决方案-------------------- --看错,改下
SELECT type FROM [user] group by type ORDER BY min(ID) DESC