When I run this Update SQL in DBVis, I get an error (Data truncation: Data too long for column 'Description' at row 1
).
However, in Perl (DBI), this is not giving me an error I am guessing because the record actually was updated with the truncated value.
Can anyone tell me how to show this error?
As data truncations produce warnings you can use SHOW WARNINGS
to see them.
And you can promote warnings to fatal errors by setting server's SQL Mode to one that forbids truncations (e.g. TRADITIONAL
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With