Skip to content

Instantly share code, notes, and snippets.

@mikedamm
Created December 12, 2012 03:39
Show Gist options
  • Save mikedamm/4264678 to your computer and use it in GitHub Desktop.
Save mikedamm/4264678 to your computer and use it in GitHub Desktop.
MySQL INT(x) is useless
mysql> show create table testing;
+---------+----------------------------------------------------------------------------------------------+
| Table | Create Table |
+---------+----------------------------------------------------------------------------------------------+
| testing | CREATE TABLE `testing` (
`foobar` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+---------+----------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> insert into testing ( foobar ) values ( 99999999 );
Query OK, 1 row affected (0.01 sec)
mysql> select * from testing;
+----------+
| foobar |
+----------+
| 99999999 |
+----------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment