title: Default size of SMALLINT, TINYINT etc. in MySQL
body: <p>As per <a href="https://dev.mysql.com/doc/refman/5.6/en/integer-types.html" rel="nofollow noreferrer">this</a> documentation, default size of SMALLINT is 2 bytes. I just did this:</p>
  <pre><code>CREATE TABLE MYTABLE
  (
      MYDATA SMALLINT UNSIGNED NOT NULL
  ) ENGINE=InnoDB;
  </code></pre>
  <p>And when I do <code>describe MYTABLE;</code> I get:</p>
  <blockquote>
  <p>Field, Type, Null, Key, Default, Extra</p>
  <p>'MYDATA', 'smallint(5) unsigned', 'NO', '', NULL, ''</p>
  </blockquote>
  <p>Why is it creating MYDATA as smallint(5) ?</p>
  <p>But if I do this:</p>
  <pre><code>CREATE TABLE MYTABLE
  (
      MYDATA SMALLINT(2) UNSIGNED NOT NULL
  ) ENGINE=InnoDB;
  </code></pre>
  <p>Then it creates <code>smallint(2)</code>.</p>