title: Python SQLite: Inserting 0 integer becomes NULL in database
body: <p>I have some Python code that inserts integer values to a database, as below: </p>
  
  <pre><code>if value: #if it's not None
      self._conn.execute(
      '''UPDATE table_name SET value_holder = ? WHERE
          key_one = ? AND key_two = ? and key_three = ?''',
          [value, key_one, key_two, key_three])
  </code></pre>
  
  <p>If I run that query, table will contain empty fields, or NULL fields whenever value is 0. If I change the query setup to below, however, the fields will contain 0 instead of NULL. </p>
  
  <pre><code>if value==0:
      self._conn.execute(
      '''UPDATE table_name SET value_holder = ? WHERE
          key_one = ? AND key_two = ? and key_three = ?''',
          [0, key_one, key_two, key_three])
  
  elif value: #if it's not None
      self._conn.execute(
      '''UPDATE table_name SET value_holder = ? WHERE
          key_one = ? AND key_two = ? and key_three = ?''',
          [value, key_one, key_two, key_three])
  </code></pre>
  
  <p>How is it possible that inserting 0 vs inserting value (when value==0) results in different values in the database? </p>
  
  <p>SQLite version 3.3.6.</p>