my $dbh = DBI->connect(..., { RaiseError => 1 }); $dbh->do(q{SET sql_mode="STRICT_TRANS_TABLES,STRICT_ALL_TABLES"}); # insert