Mega Code Archive

 
Categories / MySQL / Data Type
 

Setting M to a higher value than the type allows will not allow you to extend its limit

mysql> mysql> CREATE TABLE test2(id TINYINT(10)); Query OK, 0 rows affected (0.00 sec) mysql> mysql> INSERT INTO test2(id) VALUES(100000000); Query OK, 1 row affected, 1 warning (0.00 sec) mysql> mysql> SELECT id FROM test2; +------+ | id   | +------+ |  127 | +------+ 1 row in set (0.00 sec) mysql> mysql> drop table test2; Query OK, 0 rows affected (0.00 sec)