title: MYSQL have set a column to not null but still it's accepting null value
body: <p>Structure for a table in mysql5.5</p>
  
  <p>tablename:</p>
  
  <pre><code>id:
  name:
  detail:
  </code></pre>
  
  <p>here even altering the table:</p>
  
  <pre><code>ALTER TABLE tablename MODIFY name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL;
  </code></pre>
  
  <p>OR </p>
  
  <pre><code>ALTER TABLE `tablename` CHANGE `name` `name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL DEFAULT NOT NULL;
  </code></pre>
  
  <p>after inserting value:</p>
  
  <pre><code>INSERT INTO `databasename`.`tablename` (`id`, `name`, `detail`) VALUES (NULL, '', 'asdfasfdadsfadsfafd');
  </code></pre>
  
  <p>query has run successfully no error row has been added to table,</p>
  
  <p>how can i prevent such empty or null.</p>
  
  <p>regards</p>