mysql 5.7 distinct 与order by 同时使用异常

mysql 5.7环境中 distinct 与 order by 不能同时使用

报错信息:

1 of ORDER BY clause is not in SELECT list, references column 'bbs.u.id' which is not in SELECT list; this is incompatible with DISTINCT

你可能感兴趣的:(数据库,mysql,5.7)