title: Get updated rows count from SQLite in Android using a raw query?
body: <p>How can I get the number of rows updated using an <code>update</code> statement in SQLite in Android?</p>
  
  <p>Note that I need to use some type of raw execute of a SQL statement, rather than do anything with <code>ContentValues</code> because I need a dynamic query.  Thus I can't make use of the <code>SQLiteDatabase.update()</code> method.  For example, I'm running something like</p>
  
  <pre><code>UPDATE my_table 
     SET field_name = field_name + 1
  </code></pre>
  
  <p>The methods I know of return void, e.g. <code>SQLiteDatabase.execSQL()</code>.  <code>SQLiteDatabase.rawQuery()</code> returns a <code>Cursor</code>, but the cursor has zero rows and its count is always -1.</p>