sqlite - Android SQLiteDatabase delete function -


i have 1 strange situation sqlitedatabase.delete function

this don't delete null records:

sqlitedatabase.delete(table, "ifnull(field, 0) = ?", new string[]{"0"}); 

this delete null records without problems:

sqlitedatabase.execsql("delete table ifnull(field, 0) = 0"); 

can explain me, why in first case null records not deleted?

0 number, "0" string. values of different types not equal.

the android database api not allow use type other string parameters delete(). if want put number sql statement, not use parameter insert directly.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -