SQL 错误 [3065] [HY000]: Expression #1 of ORDER BY clause is not in SELECT list, references column ‘test.tmp_202105201114.c_col_order’ which is not in SELECT list; this is incompatible with DISTINCT
mysql 里面,也是这个行为
mysql> SELECT DISTINCT c_col_distinct FROM tmp_202105201114 ORDER BY c_col_order;
ERROR 3065 (HY000): Expression #1 of ORDER BY clause is not in SELECT list, references column ‘test.tmp_202105201114.c_col_order’ which is not in SELECT list; this is incompatible with DISTINCT
mysql> select version();
±----------+
| version() |
±----------+
| 5.7.34 |
±----------+
1 row in set (0.01 sec)