title: How to update empty column in Sqlite (Android)
body: <p>I'm sure there are lots of similar question but my context is kinda different.</p>
  
  <p>So i'm working on an android app and i'm inserting data into a table. Let's say the table name is user with columns firstname and lastname which are of type text.</p>
  
  <p>I run an insert function to insert a row into the table but with information for just firstname. So firstname is inserted and lastname is empty. Now here come the problem.</p>
  
  <p>When I try to update the column lastname, it doesn't work. I don't know if it's cos it empty or null.</p>
  
  <p>My update code looks something like</p>
  
  <pre><code> int result = db.update(TABLE_USER, contentvalue, "_id= someValue", null); 
  </code></pre>
  
  <p>Result is usually 0.
  Contentvalue contains lastname and I can guarantee it's not empty. </p>
  
  <p>I don't know if during the first insert, it's mandatory to set the value of the last to null or empty and not let the db handle that cos it works if I do. Any suggestion is appreciated and i'ld like to know why it doesn't work too. Thanks</p>