title: How to find out the SQLITE query result is NULL?
body: <p>I've used the following method in my app,</p>
  
  <pre><code>-(int) getMax:(NSString *)subItemName second :(int) tableID
  {
      int count1=0;
      sqlite3_stmt *statement;
      NSString *query = [NSString stringWithFormat:@"Select MAX(NoOfItems) from billTable where SubItemName='%@' AND TableID='%d'",subItemName,tableID];
      if (sqlite3_prepare_v2(_database, [query UTF8String], -1, &amp;statement, nil)== SQLITE_OK) {
       while (sqlite3_step(statement) == SQLITE_ROW) {
              count1 = [[NSString stringWithUTF8String:(char *) sqlite3_column_text(statement, 0)]intValue];
          }
  
          sqlite3_step (statement);
      }
      return count1;
  }
  </code></pre>
  
  <p>As you can see that the my query will return the no of rows (an integer), suppose if my query returns a <code>NULL</code> value(if there is no such exists for the where clause condition in my database it returns <code>NULL</code> value. How to check it returns <code>NULL</code> after the query has been executed?</p>