mercredi 30 septembre 2015

Doing math calculations in a SQLite where clause

With Android's SQLite, is it possible to do math calculations on column values in a where clause? For example, say I want to select only the rows that have even values in their column named mColumnName as follows:

query(mTable, mColumns, mColumnName+"%2=?", new String[]{"0"}, null, null, null, null)

Will that work?

Aucun commentaire:

Enregistrer un commentaire