3 ms·
There would be no data truncation if you enable strict mode (sql_mode = 'STRICT_ALL_TABLES'). Indeterminate results appear only if the column values in a group
by codedokode 11y ago
There would be no data truncation if you enable strict mode (sql_mode = 'STRICT_ALL_TABLES'). Indeterminate results appear only if the column values in a group are different. SQL standart doesn't allow such selects at all (even if the values in the group are the same) so you have to write longer queries.
MySQL is not that bad, it was used in facebook and wikipedia.
- matwood 11y agoStrict should be the default for something that stores your data. The SQL standard does not allow selects like that for a a reason. Indeterminate results are almost always bad for something that stores data. MySql is that bad [1] and was only used by people who knew nothing about databases to question all of the dumb things MySql did. I'm so happy postgresql is finally getting popular. FB also uses php, so appealing to it being used is no argument. [1] http://grimoire.ca/mysql/choose-something-else http://grimoire.ca/mysql/choose-something-else
- morgo 11y agoAs I commented in the parent: it is the default. It was enabled for new installs in MySQL 5.6, and all installs from MySQL 5.7.