I have acreated a Table containing a column of type INT:
CREATE TEMPORARY TABLE `myTab` (`int` INT, `text` TEXT, `float` FLOAT);
Now I try to add a float value into the INT column
INSERT INTO `myTab` (`int`) VALUES (13.34);
I don't get a warning:
SHOW WARNINGS;
Although the column contains only 13 afterwards:
SELECT * FROM `myTab`;
Is it somehow possible to get a warning when a float value is added to a integer column? I'm currently using mysql Ver 14.14 Distrib 5.5.31, for debian-linux-gnu (i686) using readline 6.2
Add: I'd like to avoid adding a "check for dots" for each INT-column (How do I check to see if a value is an integer in MySQL?). I'd prefer a warning when data is lost during casting to INT.