I am interested in the question: what is added to the cell if the size of the number is exceeded by the table settings.

$sql1="CREATE TABLE `sanyoka_T1`(`pole` SMALLINT,`pole2` TEXT)"; $sql2="INSERT INTO `sanyoka_T1` (`pole`) VALUES (7657644557557)"; $sql2="INSERT INTO `sanyoka_T1` (`pole`) VALUES (55187)"; $sql2="INSERT INTO `sanyoka_T1` (`pole`) VALUES (87)"; 

I added this number 32767. How was it calculated? Here the question is not about changing the field settings.

    1 answer 1

    the number 32767 itself is the maximum number for int16 ( smallint ), I think that in your case just the maximum value is recorded (if the ceiling is above the ceiling) and the minimum (if the ceiling is below)

    • Excellent answer. Thank you - koza4ok