3 ms·
> select b from nums group by a; MySQL allows selecting columns that don't appear in GROUP BY clause. It is not good and allows you to shoot yourself in the fo
by jve 7y ago
> select b from nums group by a;
MySQL allows selecting columns that don't appear in GROUP BY clause. It is not good and allows you to shoot yourself in the foot. Gives you false sense of correctness, because, well, query works.
It just takes _one_ arbitrary value you happen to have in b and selects it.
As I'm mostly working with MSSQL and sometimes have to shoot queries at MySQL - is there any mode / strictness I can set to error out on these kind of queries rather than silently continue?