Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Warum erlaubt MySQL, eine NOT NULL-Spalte auf NULL zu aktualisieren?

Sie dürfen SQL_MODE nicht haben Setzen Sie die Ubuntu-Installation auf „Strict“.

Problem

SET SQL_MODE='STRICT_ALL_TABLES'

oder hinzufügen

SQL_MODE='STRICT_ALL_TABLES'

unter [mysqld] zu Ihrer my.cnf auf Ubuntu .