title: how to check if the column of a SQLite dabase is null
body: <p>i am not able to get a reliable result to tell if the collumn of a database is null or not.  i tried using  a query checking to see if the the column of the database returns null or a string value of "" but no matter what i do the result of my check returns a result that there is something stored in that column, even if it is empty.</p>
  
  <p>to make sure it is empty i delete all the data from the app and uninstall it from the device.  that way i know the database column is empty</p>
  
  <p>is there a better way to check if a particular column is empty?</p>
  
  <p>if a column has never been used before on a newly created database, what is in that column? is it null or is there something put in by the system as a placeholder?</p>
  
  <pre><code>displayAll.setOnClickListener(new View.OnClickListener() {
  
      public void onClick(View v) {
  
          textToShow.setText(DisplayAllFieldsObjectFromDB());
          if (DisplayAllFieldsObjectFromDB() == null) {
              Toast.makeText(DisplayTable.this, "TABLE NULL ", Toast.LENGTH_SHORT).show();
  
          } else if (DisplayAllFieldsObjectFromDB() != null) {
              Toast.makeText(DisplayTable.this, "TABLE HOLDS A VALUE ", Toast.LENGTH_SHORT).show();
  
          } else if (DisplayAllFieldsObjectFromDB().equals("")) {
              Toast.makeText(DisplayTable.this, "TABLE HOLDS EMPTY QUOTES VALUE ", Toast.LENGTH_SHORT).show();
          }
  
      }
  });
  </code></pre>
  
  <p>code from the database table</p>
  
  <pre><code>// display all data from table
  public String getAllFromDB() {
  
      String tableString = "";
  
      String result = "";
      Cursor cursor = sqLiteDatabase.query(MYDATABASE_TABLE, null,
          null, null, null, null, null);
      if (cursor != null) {
          // cursor.moveToFirst(); // use only this for getting one row
          while (cursor.moveToNext()) { // use only this for getting multiple rows
              tableString = cursor.getString(cursor.getColumnIndex(TABLE_STRING));
              result += tableString + "\n";
          }
      }    
      return result;    
  }
  </code></pre>